Skip to content
This repository was archived by the owner on Aug 17, 2023. It is now read-only.

Commit add6814

Browse files
committed
github actions: Fix build
1 parent fdaec74 commit add6814

File tree

6 files changed

+44
-79
lines changed

6 files changed

+44
-79
lines changed

.github/workflows/publish.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
3535
- name: '❄ Install dependencies'
3636
run: 'nix develop --command emanote --version'
37+
working-directory: adrestia
3738

3839
- name: '🔧 Build docs'
3940
run: |

flake.lock

Lines changed: 6 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,9 @@
55
nixpkgs.url = github:NixOS/nixpkgs/nixos-21.11;
66
flake-utils.url = github:numtide/flake-utils;
77
emanote.url = github:srid/emanote;
8-
hedgedoc-cli = {
9-
url = path:./nix/hedgedoc-cli;
10-
inputs.flake-utils.follows = "flake-utils";
11-
inputs.nixpkgs.follows = "nixpkgs";
12-
};
138
};
149

15-
outputs = { self, nixpkgs, flake-utils, emanote, hedgedoc-cli }:
10+
outputs = { self, nixpkgs, flake-utils, emanote }:
1611
flake-utils.lib.eachSystem ["x86_64-linux" "x86_64-darwin"] (system: let
1712
pkgs = nixpkgs.legacyPackages.${system};
1813

@@ -24,7 +19,7 @@
2419
nativeBuildInputs = [
2520
emanote.defaultPackage.${system}
2621
pkgs.yq
27-
(hedgedoc-cli.defaultPackage.${system}.override {
22+
(pkgs.callPackage ./nix/hedgedoc-cli/package.nix {
2823
server = "https://md.adrestia.iohkdev.io";
2924
})
3025
(pkgs.writeScriptBin "nixops" ''

nix/hedgedoc-cli/flake.lock

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/hedgedoc-cli/flake.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
description = "Hedgedoc command-line interface";
33

44
inputs = {
5-
src = {
5+
hedgedoc-cli-src = {
66
url = github:hedgedoc/cli;
77
flake = false;
88
};
99
flake-utils.url = github:numtide/flake-utils;
1010
};
1111

12-
outputs = { self, src, flake-utils, nixpkgs }:
12+
outputs = { self, hedgedoc-cli-src, flake-utils, nixpkgs }:
1313
flake-utils.lib.eachDefaultSystem (system: {
1414
defaultPackage = self.packages.${system}.hedgedoc-cli;
1515
packages.hedgedoc-cli = nixpkgs.legacyPackages.${system}.callPackage ./package.nix {
16-
inherit src;
16+
inherit hedgedoc-cli-src;
1717
};
1818
});
1919
}

nix/hedgedoc-cli/package.nix

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
{ lib, stdenv, jq, wget, curl, fetchFromGitHub, src, server ? null }: let
1+
{ lib, stdenv, jq, wget, curl, fetchFromGitHub
2+
, hedgedoc-cli-src ? (let lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.hedgedoc-cli-src.locked; in fetchFromGitHub { inherit (lock) owner repo rev; sha256 = lock.narHash; })
3+
, server ? null
4+
}: let
25

36
pname = "hedgedoc-cli";
4-
version = builtins.substring 0 8 src.lastModifiedDate; # Generate a user-friendly version number.
7+
version = if src ? lastModifiedDate
8+
then builtins.substring 0 8 src.lastModifiedDate # Generate a user-friendly version number.
9+
else "git";
10+
src = hedgedoc-cli-src;
511

612
in stdenv.mkDerivation {
713
name = "${pname}-${version}";

0 commit comments

Comments
 (0)