mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 21:29:48 +01:00
tests: add mkStubPackage in Nixpkgs overlay
This commit is contained in:
parent
2292b52203
commit
85f3c41ef2
1 changed files with 3 additions and 4 deletions
|
@ -70,12 +70,11 @@ in {
|
||||||
config = {
|
config = {
|
||||||
lib.test.mkStubPackage = mkStubPackage;
|
lib.test.mkStubPackage = mkStubPackage;
|
||||||
|
|
||||||
nixpkgs.overlays = mkIf (config.test.stubs != { }) [
|
nixpkgs.overlays = [ (self: super: { inherit mkStubPackage; }) ]
|
||||||
(self: super:
|
++ optional (config.test.stubs != { }) (self: super:
|
||||||
mapAttrs (n: v:
|
mapAttrs (n: v:
|
||||||
mkStubPackage (v // optionalAttrs (v.version == null) {
|
mkStubPackage (v // optionalAttrs (v.version == null) {
|
||||||
version = super.${n}.version or null;
|
version = super.${n}.version or null;
|
||||||
})) config.test.stubs)
|
})) config.test.stubs);
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue