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

View file

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