1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00

mkDerivation: Make separateDebugInfo assertion lazier to match other assertions

This is needed to access attributes of derivations on platforms where
they cannot be built.
This commit is contained in:
John Ericson 2018-09-18 15:35:11 -04:00
parent 6769437186
commit 2111e7b742
2 changed files with 3 additions and 6 deletions

View file

@ -94,8 +94,7 @@ callPackage ./common.nix { inherit stdenv; } {
mv $bin/bin/getconf_ $bin/bin/getconf
'';
# Hack to get around eval issue.
separateDebugInfo = !stdenv.isDarwin;
separateDebugInfo = true;
meta.description = "The GNU C Library";
}

View file

@ -83,9 +83,7 @@ rec {
doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform;
doInstallCheck' = doInstallCheck && stdenv.hostPlatform == stdenv.buildPlatform;
outputs' =
outputs ++
(if separateDebugInfo then assert stdenv.hostPlatform.isLinux; [ "debug" ] else []);
outputs' = outputs ++ lib.optional separateDebugInfo "debug";
fixedOutputDrv = attrs ? outputHash;
noNonNativeDeps = builtins.length (depsBuildTarget ++ depsBuildTargetPropagated
@ -176,7 +174,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; name + lib.optionalString
name = assert validity.handled && (separateDebugInfo -> stdenv.hostPlatform.isLinux); name + 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