@@ -83,9 +83,7 @@ rec {
8383 doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform;
8484 doInstallCheck' = doInstallCheck && stdenv.hostPlatform == stdenv.buildPlatform;
8585
86− outputs' =
87− outputs ++
88− (if separateDebugInfo then assert stdenv.hostPlatform.isLinux; [ "debug" ] else []);
86+ outputs' = outputs ++ lib.optional separateDebugInfo "debug";
8987
9088 fixedOutputDrv = attrs ? outputHash;
9189 noNonNativeDeps = builtins.length (depsBuildTarget ++ depsBuildTargetPropagated
@@ -176,7 +174,7 @@ rec {
176174 // {
177175 # A hack to make `nix-env -qa` and `nix search` ignore broken packages.
178176 # TODO(@oxij): remove this assert when something like NixOS/nix#1771 gets merged into nix.
179− name = assert validity.handled; name + lib.optionalString
177+ name = assert validity.handled && (separateDebugInfo -> stdenv.hostPlatform.isLinux); name + lib.optionalString
180178 # Fixed-output derivations like source tarballs shouldn't get a host
181179 # suffix. But we have some weird ones with run-time deps that are
182180 # just used for their side-affects. Those might as well since the