about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-22 13:25:35 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-23 10:06:08 -0400
commit983e74ae4e9092a302ba281357e33ae9f32a2024 (patch)
tree8dd4399dba0b512b5b57c8a6b851558e5e73c2bc
parent25f4f06c2ea7a70bceb3a934de271ae3bed0675d (diff)
downloadnixlib-983e74ae4e9092a302ba281357e33ae9f32a2024.tar
nixlib-983e74ae4e9092a302ba281357e33ae9f32a2024.tar.gz
nixlib-983e74ae4e9092a302ba281357e33ae9f32a2024.tar.bz2
nixlib-983e74ae4e9092a302ba281357e33ae9f32a2024.tar.lz
nixlib-983e74ae4e9092a302ba281357e33ae9f32a2024.tar.xz
nixlib-983e74ae4e9092a302ba281357e33ae9f32a2024.tar.zst
nixlib-983e74ae4e9092a302ba281357e33ae9f32a2024.zip
stdenv: Avoid targetPlatform.isDarwin causing a mass rebuild
We want `buildPackages` to be almost the same as
`buildPackages.buildPackges`, but that is only true if most packages
don't care about the target platform. The commented code however made
them all care about whether the target platform was Darwin.
-rw-r--r--pkgs/stdenv/generic/default.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index e9ae54811a21..2eac9e58daa6 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -90,9 +90,14 @@ let
       '' + lib.optionalString hostPlatform.isDarwin ''
         export NIX_DONT_SET_RPATH=1
         export NIX_NO_SELF_RPATH=1
-      '' + lib.optionalString targetPlatform.isDarwin ''
-        export NIX_TARGET_DONT_SET_RPATH=1
-      '';
+      ''
+      # TODO this should be uncommented, but it causes stupid mass rebuilds. I
+      # think the best solution would just be to fixup linux RPATHs so we don't
+      # need to set `-rpath` anywhere.
+      # + lib.optionalString targetPlatform.isDarwin ''
+      #   export NIX_TARGET_DONT_SET_RPATH=1
+      # ''
+      ;
 
       inherit initialPath shell
         defaultNativeBuildInputs defaultBuildInputs;