Skip to content

Commit

Permalink
Fixed nix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx authored and ni4 committed Mar 26, 2023
1 parent 51e7c47 commit 4aa420d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
- uses: cachix/install-nix-action@v15
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix build
- run: nix build .?submodules=1
15 changes: 2 additions & 13 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
{ pkgs ? import <nixpkgs> { }
, lib ? pkgs.lib
, stdenv ? pkgs.stdenv
, fetchgit
}:
let
sexpSource = fetchgit {
name = "sexp";
url = "https://github.com/rnpgp/sexp.git";
rev = "refs/tags/v0.7.0";
sha256 = "MA54sKyHBFB6ZAGQCHFswIeiVn/TgTjGhP1dE+fS+sU=";
};
in

stdenv.mkDerivation rec {
pname = "rnp";
version = "unstable";

src = ./.;

sexp = import sexpSource { inherit pkgs; };

buildInputs = with pkgs; [ zlib bzip2 json_c botan2 ];

cmakeFlags = [
Expand All @@ -41,7 +31,6 @@ stdenv.mkDerivation rec {
commitEpoch=$(date +%s)
baseVersion=$(cat version.txt)
echo "v$baseVersion-0-g0-dirty+$commitEpoch" > version.txt
# For generating the correct timestamp in cmake
export SOURCE_DATE_EPOCH=$commitEpoch
'';
Expand All @@ -53,4 +42,4 @@ stdenv.mkDerivation rec {
platforms = platforms.all;
maintainers = with maintainers; [ ribose-jeffreylau ];
};
}
}
42 changes: 6 additions & 36 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils, sexp }:
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
Expand All @@ -23,4 +23,4 @@
];
};
});
}
}

0 comments on commit 4aa420d

Please sign in to comment.