diff options
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 files changed, 6 insertions, 0 deletions
| -rw-r--r-- | zkvmLib.nix | 6 |
diff --git a/zkvmLib.nix b/zkvmLib.nix index cd92d5a..8c6f262 100644 --- a/zkvmLib.nix +++ b/zkvmLib.nix @@ -68,7 +68,13 @@ pkgs: guest: let mkdir -p "$out" cd zkvms/${args.pname} + '' + (if args ? extraLockfile then '' + cat ${args.extraLockfile} > lockfile + tail -n +4 ./host/Cargo.lock >> lockfile + '' else '' cat ./host/Cargo.lock > lockfile + '') + '' + tail -n +4 ./guest/Cargo.lock >> lockfile tail -n +4 ../../guests/${guest}/Cargo.lock >> lockfile |
