1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 18:59:47 +01:00

tests: add mkStubPackage in Nixpkgs overlay

This commit is contained in:
Robert Helgesson 2024-03-03 06:55:43 +01:00 committed by Mikilio
parent 2292b52203
commit 85f3c41ef2
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F

View file

@ -70,12 +70,11 @@ in {
config = {
lib.test.mkStubPackage = mkStubPackage;
nixpkgs.overlays = mkIf (config.test.stubs != { }) [
(self: super:
nixpkgs.overlays = [ (self: super: { inherit mkStubPackage; }) ]
++ optional (config.test.stubs != { }) (self: super:
mapAttrs (n: v:
mkStubPackage (v // optionalAttrs (v.version == null) {
version = super.${n}.version or null;
})) config.test.stubs)
];
})) config.test.stubs);
};
}