From 464f736f1f3e2a236c94e3226c850e956f0aa7ca Mon Sep 17 00:00:00 2001 From: samuelburnham <45365069+samuelburnham@users.noreply.github.com> Date: Mon, 13 Oct 2025 15:59:43 -0400 Subject: [PATCH] chore: Switch to pre-built lean4-nix binary --- .github/workflows/ci.yml | 4 ++-- blake3.nix | 4 ++-- flake.lock | 18 +++++++++--------- flake.nix | 24 ++++++++---------------- 4 files changed, 21 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd19974..41e393b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/blake3.nix b/blake3.nix index f27e152..7ea4894 100644 --- a/blake3.nix +++ b/blake3.nix @@ -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 @@ -40,7 +40,7 @@ name = "blake3-lib"; src = ./.; roots = ["Blake3"]; - staticLibDeps = [ "${blake3-c}/lib" ]; + staticLibDeps = ["${blake3-c}/lib"]; groupStaticLibs = true; }; diff --git a/flake.lock b/flake.lock index 9430540..880f2c7 100644 --- a/flake.lock +++ b/flake.lock @@ -22,11 +22,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1754487366, - "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", + "lastModified": 1760948891, + "narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", + "rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", "type": "github" }, "original": { @@ -59,11 +59,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1758037834, - "narHash": "sha256-P2rBelR9lgFJPE8kEV1wwX1LHK6xWlVcQqEez84ss6E=", + "lastModified": 1760753731, + "narHash": "sha256-RJCrWSH1Iz8WPVL2hB2U/kBXuct4+tKo/aiPCaOYPzM=", "owner": "lenianiva", "repo": "lean4-nix", - "rev": "d87ff09bad00ca4addd471a68a968f2aa29c7c36", + "rev": "ae7abc9f97a26da2ecf5233b9edfe3ba0af1b9a9", "type": "github" }, "original": { @@ -90,11 +90,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1753579242, - "narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=", + "lastModified": 1754788789, + "narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e", + "rev": "a73b9c743612e4244d865a2fdee11865283c04e6", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 23929ed..400e7f7 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; @@ -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 @@ -62,7 +55,6 @@ devShells.default = pkgs.mkShell { packages = with pkgs; [ lean.lean - lean.lean-all ]; };