From 4b5e5eec2dc8e5b48c10ca67deba467eb1441d53 Mon Sep 17 00:00:00 2001 From: Oleks Date: Mon, 16 Mar 2026 14:32:36 +0200 Subject: [PATCH] fix: override rustc-unwrapped (not wrapper) for symlink_file patch to actually apply --- flake.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index b4e13db..99b0fe9 100644 --- a/flake.nix +++ b/flake.nix @@ -98,11 +98,13 @@ # s390x cross-compilation. Multiple call sites use t!(symlink_file(...)). # Patch the symlink_file method body to remove existing dest first. (final: prev: { - rustc = prev.rustc.overrideAttrs (old: { - postPatch = (old.postPatch or "") + '' - sed -i "s|if !self.config.dry_run() { symlink_file(src.as_ref(), link.as_ref()) }|if !self.config.dry_run() { let _ = std::fs::remove_file(link.as_ref()); symlink_file(src.as_ref(), link.as_ref()) }|" src/bootstrap/src/lib.rs - ''; - }); + rustc = prev.rustc.override { + rustc-unwrapped = prev.rustc.unwrapped.overrideAttrs (old: { + postPatch = (old.postPatch or "") + '' + sed -i "s|if !self.config.dry_run() { symlink_file(src.as_ref(), link.as_ref()) }|if !self.config.dry_run() { let _ = std::fs::remove_file(link.as_ref()); symlink_file(src.as_ref(), link.as_ref()) }|" src/bootstrap/src/lib.rs + ''; + }); + }; }) ];