tests/stubs: inherit default versions from pkgs (#4069)
* tests/stubs: inherit default versions from pkgs * tests/browserpass: temporarily disable on darwin The package currently fails to evaluate on darwin due to a nixpkgs problem: https://github.com/NixOS/nixpkgs/pull/236258#issuecomment-1583450593
This commit is contained in:
parent
f889ec0ec3
commit
69bdd6de50
|
@ -64,7 +64,6 @@ import nmt {
|
|||
./modules/programs/bat
|
||||
./modules/programs/bottom
|
||||
./modules/programs/broot
|
||||
./modules/programs/browserpass
|
||||
./modules/programs/btop
|
||||
./modules/programs/dircolors
|
||||
./modules/programs/direnv
|
||||
|
@ -157,6 +156,7 @@ import nmt {
|
|||
./modules/programs/autorandr
|
||||
./modules/programs/beets # One test relies on services.mpd
|
||||
./modules/programs/borgmatic
|
||||
./modules/programs/browserpass # TODO re-enable on Darwin when https://github.com/NixOS/nixpkgs/pull/236258#issuecomment-1583450593 is fixed
|
||||
./modules/programs/firefox
|
||||
./modules/programs/foot
|
||||
./modules/programs/fuzzel
|
||||
|
|
|
@ -15,12 +15,13 @@ let
|
|||
outPath = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "@${name}@";
|
||||
defaultText = "@\${name}@";
|
||||
defaultText = literalExpression ''"@''${name}@"'';
|
||||
};
|
||||
|
||||
version = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
defaultText = literalExpression "pkgs.\${name}.version or null";
|
||||
};
|
||||
|
||||
buildScript = mkOption {
|
||||
|
@ -65,7 +66,12 @@ in {
|
|||
config = {
|
||||
lib.test.mkStubPackage = mkStubPackage;
|
||||
|
||||
nixpkgs.overlays = mkIf (config.test.stubs != { })
|
||||
[ (self: super: mapAttrs (n: mkStubPackage) config.test.stubs) ];
|
||||
nixpkgs.overlays = mkIf (config.test.stubs != { }) [
|
||||
(self: super:
|
||||
mapAttrs (n: v:
|
||||
mkStubPackage (v // optionalAttrs (v.version == null) {
|
||||
version = super.${n}.version or null;
|
||||
})) config.test.stubs)
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue