From c3f361772d1c3f53b2eb9875384d8b5f380ddcfe Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 23 Mar 2026 17:51:31 +0100 Subject: [PATCH] rustPlatform.importCargoLock: switch if/else statements Now they are in the same order as the same check above --- pkgs/build-support/rust/import-cargo-lock.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/rust/import-cargo-lock.nix b/pkgs/build-support/rust/import-cargo-lock.nix index f668cb5bac05..9c172c7842f8 100644 --- a/pkgs/build-support/rust/import-cargo-lock.nix +++ b/pkgs/build-support/rust/import-cargo-lock.nix @@ -283,12 +283,12 @@ let mkdir -p $out/.cargo ${ - if lockFile != null then - "ln -s ${lockFile} $out/Cargo.lock" - else + if lockFile == null then '' printf "%s" "$lockFileContents" > "$out/Cargo.lock" '' + else + "ln -s ${lockFile} $out/Cargo.lock" } cat > $out/.cargo/config.toml <