Commit 6fcd1dcb authored by figsoda's avatar figsoda Committed by Winter
Browse files

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
parent 115e3413
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -184,9 +184,14 @@ let
      ''
      else throw "Cannot handle crate source: ${pkg.source}";

  vendorDir = runCommand "cargo-vendor-dir" (lib.optionalAttrs (lockFile == null) {
  vendorDir = runCommand "cargo-vendor-dir"
    (if lockFile == null then {
      inherit lockFileContents;
      passAsFile = [ "lockFileContents" ];
    } else {
      passthru = {
        inherit lockFile;
      };
    }) ''
    mkdir -p $out/.cargo