Skip to content

Commit

Permalink
Allow setting the Cargo.lock via nix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril committed Nov 14, 2024
1 parent d9520c1 commit 8b45ccd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,25 @@
, mold-wrapped
, ninja
, python3
, runCommand
, crane
, hax
, googletest
, benchmark
, json
, tools-environment
, cargoLock ? ./Cargo.lock
, checkHax ? true
, runBenchmarks ? true
}:
let
craneLib = crane.mkLib pkgs;
src = ./.;
src = runCommand "libcrux-src" { } ''
cp -r ${./.} $out
chmod u+w $out
rm -f $out/Cargo.lock
cp ${cargoLock} $out/Cargo.lock
'';
cargoArtifacts = craneLib.buildDepsOnly { inherit src; };
in
craneLib.buildPackage (tools-environment // {
Expand Down

0 comments on commit 8b45ccd

Please sign in to comment.