tests.srcOnly: Work around duplication of attr on darwin

This commit is contained in:
Robert Hensing 2025-04-05 18:54:01 +02:00 committed by Philip Taron
parent d93bb6f46a
commit 966fc630dd
No known key found for this signature in database

View File

@ -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