diff --git a/flake.nix b/flake.nix index 1aa1291..ad6346b 100644 --- a/flake.nix +++ b/flake.nix @@ -97,18 +97,22 @@ # Rustc bootstrap: symlink_file panics with "File exists" during # s390x cross-compilation. Multiple call sites use t!(symlink_file(...)). # Patch the symlink_file method body to remove existing dest first. - (final: prev: let - patchedRustcUnwrapped = prev.rustc-unwrapped.overrideAttrs (old: { - patches = (old.patches or [ ]) ++ [ - ./patches/rustc-symlink-file-eexist.patch - ]; - }); - in { - rustc-unwrapped = patchedRustcUnwrapped; - rustc = prev.rustc.override { + ( + final: prev: + let + patchedRustcUnwrapped = prev.rustc-unwrapped.overrideAttrs (old: { + patches = (old.patches or [ ]) ++ [ + ./patches/rustc-symlink-file-eexist.patch + ]; + }); + in + { rustc-unwrapped = patchedRustcUnwrapped; - }; - }) + rustc = prev.rustc.override { + rustc-unwrapped = patchedRustcUnwrapped; + }; + } + ) ]; # Native builds