fixDarwinDylibNames: use callPackage; use targetPackages.stdenv.cc for targetPrefix

This was the only place in the codebase which used `darwin.binutils.targetPrefix`.
Others use `stdenv.cc.targetPrefix`; on static builds, that produces an empty `targetPrefix` where previously it was including the platform name.
Still others use this one (`targetPackages.stdenv.cc.targetPrefix`) and that produces no rebuilds.
This commit is contained in:
Philip Taron
2025-07-22 14:57:33 -07:00
parent 6c6254bd01
commit ec28f43a92
+12 -5
View File
@@ -892,11 +892,18 @@ with pkgs;
name = "set-java-classpath-hook";
} ../build-support/setup-hooks/set-java-classpath.sh;
fixDarwinDylibNames = makeSetupHook {
name = "fix-darwin-dylib-names-hook";
substitutions = { inherit (darwin.binutils) targetPrefix; };
meta.platforms = lib.platforms.darwin;
} ../build-support/setup-hooks/fix-darwin-dylib-names.sh;
fixDarwinDylibNames = callPackage (
{
lib,
targetPackages,
makeSetupHook,
}:
makeSetupHook {
name = "fix-darwin-dylib-names-hook";
substitutions = { inherit (targetPackages.stdenv.cc) targetPrefix; };
meta.platforms = lib.platforms.darwin;
} ../build-support/setup-hooks/fix-darwin-dylib-names.sh
) { };
writeDarwinBundle = callPackage ../build-support/make-darwin-bundle/write-darwin-bundle.nix { };