diff --git a/pkgs/build-support/src-only/tests.nix b/pkgs/build-support/src-only/tests.nix index d00a2060703e..f739715e717d 100644 --- a/pkgs/build-support/src-only/tests.nix +++ b/pkgs/build-support/src-only/tests.nix @@ -1,4 +1,5 @@ { + lib, runCommand, srcOnly, hello, @@ -32,16 +33,26 @@ let ; }; helloDrvSimpleSrc = srcOnly helloDrvSimple; - helloDrvSimpleSrcFreeform = srcOnly { - inherit (helloDrvSimple) - name - pname - version - src - patches - stdenv - ; - }; + helloDrvSimpleSrcFreeform = srcOnly ( + { + inherit (helloDrvSimple) + name + pname + version + src + patches + stdenv + ; + } + # __impureHostDeps get duplicated in helloDrvSimpleSrc (on darwin) + # This is harmless, but fails the test for what is arguably an + # unrelated non-problem, so we just work around it here. + # The inclusion of __impureHostDeps really shouldn't be required, + # and should be removed from this test. + // lib.optionalAttrs (helloDrvSimple ? __impureHostDeps) { + inherit (helloDrvSimple) __impureHostDeps; + } + ); in