From 2f198956c7b214d79715f13b57eb1b9069ebb523 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 29 Jun 2017 01:17:52 -0400 Subject: [PATCH 1/2] stdenv: Make separate-debug-info.sh a `nativeBuildInput` --- pkgs/stdenv/generic/make-derivation.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 31b0428eeb2..e2f072d8149 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -49,12 +49,10 @@ rec { dependencies' = let justMap = map lib.chooseDevOutputs dependencies; - nativeBuildInputs = lib.elemAt justMap 0 + nativeBuildInputs = lib.head justMap + ++ lib.optional separateDebugInfo ../../build-support/setup-hooks/separate-debug-info.sh ++ lib.optional stdenv.hostPlatform.isWindows ../../build-support/setup-hooks/win-dll-link.sh; - buildInputs = lib.elemAt justMap 1 - # TODO(@Ericson2314): Should instead also be appended to `nativeBuildInputs`. - ++ lib.optional separateDebugInfo ../../build-support/setup-hooks/separate-debug-info.sh; - in [ nativeBuildInputs buildInputs ]; + in [ nativeBuildInputs ] ++ lib.tail justMap; propagatedDependencies' = map lib.chooseDevOutputs propagatedDependencies; From 5896d84dbbcff1b1e589e274e3addb6a0f1d2e4d Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 29 Jun 2017 01:19:20 -0400 Subject: [PATCH 2/2] stdenv: Stop reversing the list of sandbox stuff We're breaking hashes anyways --- pkgs/stdenv/generic/make-derivation.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index e2f072d8149..05221e2f3c1 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -62,15 +62,14 @@ rec { "__impureHostDeps" "__propagatedImpureHostDeps" "sandboxProfile" "propagatedSandboxProfile"]) // (let - # TODO(@Ericson2314): Reversing of dep lists is just temporary to avoid Darwin mass rebuild. computedSandboxProfile = - lib.concatMap (input: input.__propagatedSandboxProfile or []) (stdenv.extraBuildInputs ++ lib.concatLists (lib.reverseList dependencies')); + lib.concatMap (input: input.__propagatedSandboxProfile or []) (stdenv.extraBuildInputs ++ lib.concatLists dependencies'); computedPropagatedSandboxProfile = - lib.concatMap (input: input.__propagatedSandboxProfile or []) (lib.concatLists (lib.reverseList propagatedDependencies')); + lib.concatMap (input: input.__propagatedSandboxProfile or []) (lib.concatLists propagatedDependencies'); computedImpureHostDeps = - lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) (stdenv.extraBuildInputs ++ lib.concatLists (lib.reverseList dependencies'))); + lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) (stdenv.extraBuildInputs ++ lib.concatLists dependencies')); computedPropagatedImpureHostDeps = - lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) (lib.concatLists (lib.reverseList propagatedDependencies'))); + lib.unique (lib.concatMap (input: input.__propagatedImpureHostDeps or []) (lib.concatLists propagatedDependencies')); in { builder = attrs.realBuilder or stdenv.shell;