diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-12-06 17:09:07 -0600 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-12-06 17:09:07 -0600 |
commit | 805c9d4847b565784d6d00f4379ce6661fea7619 (patch) | |
tree | 80dc02686f7f4781063fcb3b70b4d0b1318a50b9 /pkgs | |
parent | 399ac47521d80182668ecbb2360b13ff41e119de (diff) |
top-level/static.nix: put makeStaticDarwin first in staticAdapters
This needs to go first since the .override will reset the mkDerivation
function, removing any other customisations done afterwards. Kind of
hacky, but seems to work correctly right now.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/top-level/static.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index 82708d112f1e..b8d0d16e97ba 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -34,14 +34,18 @@ self: super: let }); }; - staticAdapters = [ makeStaticLibraries propagateBuildInputs ] + staticAdapters = + # makeStaticDarwin must go first so that the extraBuildInputs + # override does not recreate mkDerivation, removing subsequent + # adapters. + optional super.stdenv.hostPlatform.isDarwin makeStaticDarwin + + ++ [ makeStaticLibraries propagateBuildInputs ] # Apple does not provide a static version of libSystem or crt0.o # So we can’t build static binaries without extensive hacks. ++ optional (!super.stdenv.hostPlatform.isDarwin) makeStaticBinaries - ++ optional super.stdenv.hostPlatform.isDarwin makeStaticDarwin - # Glibc doesn’t come with static runtimes by default. # ++ optional (super.stdenv.hostPlatform.libc == "glibc") ((flip overrideInStdenv) [ self.stdenv.glibc.static ]) ; |