mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 11:00:19 +03:00
rustPlatform.importCargoLock: passthru lockFile
This is to make it possible to implement support for updating `Cargo.lock`s in nix-update by exposing the path to the `Cargo.lock` file
This commit is contained in:
parent
115e3413e1
commit
6fcd1dcb0b
@ -184,10 +184,15 @@ let
|
||||
''
|
||||
else throw "Cannot handle crate source: ${pkg.source}";
|
||||
|
||||
vendorDir = runCommand "cargo-vendor-dir" (lib.optionalAttrs (lockFile == null) {
|
||||
inherit lockFileContents;
|
||||
passAsFile = [ "lockFileContents" ];
|
||||
}) ''
|
||||
vendorDir = runCommand "cargo-vendor-dir"
|
||||
(if lockFile == null then {
|
||||
inherit lockFileContents;
|
||||
passAsFile = [ "lockFileContents" ];
|
||||
} else {
|
||||
passthru = {
|
||||
inherit lockFile;
|
||||
};
|
||||
}) ''
|
||||
mkdir -p $out/.cargo
|
||||
|
||||
${
|
||||
|
Loading…
Reference in New Issue
Block a user