diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-11-28 12:29:00 -0600 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2018-11-28 12:29:00 -0600 |
commit | d64f28815486924a6fc3b1d9a46e6925b5d3c2ba (patch) | |
tree | 1e3ca93678be2de2f1609509dcd917cc96b0f0de /pkgs | |
parent | 13e45aeed302363be9eed17c75db80fcc3e0100e (diff) |
make-derivation: don’t assert on separateDebugInfo
When separateDebugInfo = true & !stdenv.hostPlatform.isLinux, we
always gave an error. There is no reason to do this. Instead, just
don’t add separate debug info when we aren’t on Linux.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/stdenv/generic/make-derivation.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index b4e391629511..2debf063c7eb 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -88,7 +88,8 @@ rec { doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform; doInstallCheck' = doInstallCheck && stdenv.hostPlatform == stdenv.buildPlatform; - outputs' = outputs ++ lib.optional separateDebugInfo "debug"; + separateDebugInfo' = separateDebugInfo && stdenv.hostPlatform.isLinux; + outputs' = outputs ++ lib.optional separateDebugInfo' "debug"; fixedOutputDrv = attrs ? outputHash; noNonNativeDeps = builtins.length (depsBuildTarget ++ depsBuildTargetPropagated @@ -123,7 +124,7 @@ rec { [ (map (drv: drv.__spliced.buildBuild or drv) depsBuildBuild) (map (drv: drv.nativeDrv or drv) nativeBuildInputs - ++ lib.optional separateDebugInfo ../../build-support/setup-hooks/separate-debug-info.sh + ++ lib.optional separateDebugInfo' ../../build-support/setup-hooks/separate-debug-info.sh ++ lib.optional stdenv.hostPlatform.isWindows ../../build-support/setup-hooks/win-dll-link.sh) (map (drv: drv.__spliced.buildTarget or drv) depsBuildTarget) ] @@ -181,7 +182,7 @@ rec { // { # A hack to make `nix-env -qa` and `nix search` ignore broken packages. # TODO(@oxij): remove this assert when something like NixOS/nix#1771 gets merged into nix. - name = assert validity.handled && (separateDebugInfo -> stdenv.hostPlatform.isLinux); computedName + lib.optionalString + name = assert validity.handled; computedName + lib.optionalString # Fixed-output derivations like source tarballs shouldn't get a host # suffix. But we have some weird ones with run-time deps that are # just used for their side-affects. Those might as well since the |