Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ jobs:
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- run: nix build --accept-flake-config
- run: nix run --accept-flake-config
- run: nix build
- run: nix run
4 changes: 2 additions & 2 deletions blake3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
blake3-c = pkgs.stdenv.mkDerivation {
name = "blake3-c";
src = ./.;
buildInputs = [pkgs.gcc pkgs.lean.lean-all];
buildInputs = [pkgs.gcc pkgs.lean.lean];
buildPhase = builtins.concatStringsSep "\n" buildSteps;
installPhase = ''
mkdir -p $out/lib $out/include
Expand All @@ -40,7 +40,7 @@
name = "blake3-lib";
src = ./.;
roots = ["Blake3"];
staticLibDeps = [ "${blake3-c}/lib" ];
staticLibDeps = ["${blake3-c}/lib"];
groupStaticLibs = true;
};

Expand Down
18 changes: 9 additions & 9 deletions flake.lock

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

24 changes: 8 additions & 16 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
{
description = "Blake3 Nix Flake";

nixConfig = {
extra-substituters = [
"https://cache.garnix.io"
];
extra-trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
};

inputs = {
# Follow lean4/nixpkgs so we stay in sync
nixpkgs.follows = "lean4-nix/nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
lean4-nix.url = "github:lenianiva/lean4-nix";
Expand Down Expand Up @@ -48,12 +40,13 @@
};

packages = {
default = ((lean4-nix.lake {inherit pkgs;}).mkPackage {
src = ./.;
roots = ["Blake3Test"];
deps = [lib.blake3-lib];
staticLibDeps = [ "${lib.blake3-c}/lib" ];
})
default =
((lean4-nix.lake {inherit pkgs;}).mkPackage {
src = ./.;
roots = ["Blake3Test"];
deps = [lib.blake3-lib];
staticLibDeps = ["${lib.blake3-c}/lib"];
})
.executable;
# Downstream lean4-nix packages must also link to the static lib using the `staticLibDeps` attribute.
# See https://github.com/argumentcomputer/lean4-nix/blob/dev/templates/dependency/flake.nix for an example
Expand All @@ -62,7 +55,6 @@
devShells.default = pkgs.mkShell {
packages = with pkgs; [
lean.lean
lean.lean-all
];
};

Expand Down