Skip to content

Commit 97975be

Browse files
committed
feat(zkvmLib): Ability to add an extra Cargo.lock
Adds the ability to specify an `extraLockfile` attribute in args. Its value should evaluate to a string path. It's included in the beginning, so it overshadows dependencies, which are specified in the other Cargo.lock files. Must be added to commonArgs (i.e. to both `buildDepsOnly` and `buildPackage` args).
1 parent a8264df commit 97975be

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

zkvmLib.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,13 @@ pkgs: guest: let
6868
mkdir -p "$out"
6969
cd zkvms/${args.pname}
7070
71+
'' + (if args ? extraLockfile then ''
72+
cat ${args.extraLockfile} > lockfile
73+
tail -n +4 ./host/Cargo.lock >> lockfile
74+
'' else ''
7175
cat ./host/Cargo.lock > lockfile
76+
'') + ''
77+
7278
tail -n +4 ./guest/Cargo.lock >> lockfile
7379
tail -n +4 ../../guests/${guest}/Cargo.lock >> lockfile
7480

0 commit comments

Comments
 (0)