ne: use dummy package in tests

This is to avoid unnecessary downloads and builds when running the
tests suite.
This commit is contained in:
Robert Helgesson 2020-06-24 23:02:18 +02:00
parent 54b69d2ef8
commit 5a15f3833d
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89
2 changed files with 10 additions and 1 deletions

View File

@ -1,13 +1,16 @@
{ config, lib, pkgs, ... }:
with lib;
let
defpref = ''
defined through defaultPreferences
'';
autopref = ''
defined through automaticPreferences
'';
in {
config = {
programs.ne = {
@ -15,6 +18,10 @@ in {
defaultPreferences = defpref;
automaticPreferences.".default" = autopref;
};
nixpkgs.overlays =
[ (self: super: { ne = pkgs.writeScriptBin "dummy-ne" ""; }) ];
nmt = {
description =
"Check that it gracefully handles the case of both defaultPreferences and automaticPreferences.'.default' being set, defaulting to the former.";
@ -24,7 +31,6 @@ in {
builtins.toFile "defpref" defpref
}
'';
};
};
}

View File

@ -53,6 +53,9 @@ in {
inherit automaticPreferences;
};
nixpkgs.overlays =
[ (self: super: { ne = pkgs.writeScriptBin "dummy-ne" ""; }) ];
nmt = {
description = "Check that configuration files are correctly written";
script = concatStringsSep "\n" [