mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
cygwin-dll-link: move from make-derivation to cross stdenv
This commit is contained in:
@@ -18,7 +18,7 @@ addOutputDLLPaths() {
|
||||
postInstallHooks+=(addOutputDLLPaths)
|
||||
|
||||
_dllDeps() {
|
||||
"$OBJDUMP" -p "$1" \
|
||||
@objdump@ -p "$1" \
|
||||
| sed -n 's/.*DLL Name: \(.*\)/\1/p' \
|
||||
| sort -u
|
||||
}
|
||||
13
pkgs/os-specific/cygwin/cygwin-dll-link-hook/default.nix
Normal file
13
pkgs/os-specific/cygwin/cygwin-dll-link-hook/default.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
lib,
|
||||
makeSetupHook,
|
||||
binutils-unwrapped,
|
||||
stdenv,
|
||||
callPackage,
|
||||
}:
|
||||
makeSetupHook {
|
||||
name = "cygwin-dll-link-hook";
|
||||
substitutions = {
|
||||
objdump = "${lib.getBin binutils-unwrapped}/${stdenv.targetPlatform.config}/bin/objdump";
|
||||
};
|
||||
} ./cygwin-dll-link.sh
|
||||
@@ -21,5 +21,7 @@ makeScopeWithSplicing' {
|
||||
# this is here to avoid symlinks being made to cygwin1.dll in /nix/store
|
||||
newlib-cygwin-nobin = callPackage ./newlib-cygwin/nobin.nix { };
|
||||
newlib-cygwin-headers = callPackage ./newlib-cygwin { headersOnly = true; };
|
||||
|
||||
cygwinDllLinkHook = callPackage ./cygwin-dll-link-hook { };
|
||||
};
|
||||
}
|
||||
|
||||
@@ -83,7 +83,10 @@ lib.init bootStages
|
||||
|| p.isGenode;
|
||||
in
|
||||
f hostPlatform && !(f buildPlatform)
|
||||
) buildPackages.updateAutotoolsGnuConfigScriptsHook;
|
||||
) buildPackages.updateAutotoolsGnuConfigScriptsHook
|
||||
++ lib.optional (
|
||||
hostPlatform.isCygwin && !buildPlatform.isCygwin
|
||||
) buildPackages.cygwin.cygwinDllLinkHook;
|
||||
})
|
||||
);
|
||||
in
|
||||
|
||||
@@ -475,7 +475,6 @@ let
|
||||
nativeBuildInputs
|
||||
++ optional separateDebugInfo' ../../build-support/setup-hooks/separate-debug-info.sh
|
||||
++ optional isWindows ../../build-support/setup-hooks/win-dll-link.sh
|
||||
++ optional isCygwin ../../build-support/setup-hooks/cygwin-dll-link.sh
|
||||
++ optionals doCheck nativeCheckInputs
|
||||
++ optionals doInstallCheck nativeInstallCheckInputs;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user