From b8e5d76027e6736dbe5811c31db71ee5cdbe9d42 Mon Sep 17 00:00:00 2001 From: phaer Date: Fri, 27 Jun 2025 19:56:09 +0200 Subject: [PATCH] repart-image: do not run fixupPhase... These derivation output one or more disk image files and metadata in JSON, none of which seem to be good targets for patchelf, stripping or other things that typically happen in fixupPhase. I noticed that specifically shebang patching took a long time when building bigger images, roughly doubling build times at times. This might be due to a traversal of an entire disk images, dozens of gigabytes in size while looking for interpreters. All tests in nix-build -A nixosTests.systemd-repart passed, but no further testing was done yet. --- nixos/modules/image/repart-image.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/image/repart-image.nix b/nixos/modules/image/repart-image.nix index 49087d4786c5..026f68418e95 100644 --- a/nixos/modules/image/repart-image.nix +++ b/nixos/modules/image/repart-image.nix @@ -189,6 +189,7 @@ stdenvNoCC.mkDerivation ( dontUnpack = true; dontConfigure = true; + dontFixup = true; doCheck = false; patchPhase = ''