From faa2945606213619dac773b9264c29fa748ad935 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Fri, 6 Mar 2020 00:26:36 +0100 Subject: [PATCH] tests: remove package dependencies on rofi and abook --- tests/modules/programs/abook/no-settings.nix | 3 +++ tests/modules/programs/abook/with-settings.nix | 3 +++ .../programs/rofi/assert-on-both-theme-and-colors.nix | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/modules/programs/abook/no-settings.nix b/tests/modules/programs/abook/no-settings.nix index a8e5de78c..ad04acd23 100644 --- a/tests/modules/programs/abook/no-settings.nix +++ b/tests/modules/programs/abook/no-settings.nix @@ -6,6 +6,9 @@ with lib; config = { programs.abook.enable = true; + nixpkgs.overlays = + [ (self: super: { abook = pkgs.writeScriptBin "dummy-abook" ""; }) ]; + nmt.script = '' assertPathNotExists home-files/.config/abook/abookrc ''; diff --git a/tests/modules/programs/abook/with-settings.nix b/tests/modules/programs/abook/with-settings.nix index 22703a172..3cb02a266 100644 --- a/tests/modules/programs/abook/with-settings.nix +++ b/tests/modules/programs/abook/with-settings.nix @@ -28,6 +28,9 @@ with lib; ''; }; + nixpkgs.overlays = + [ (self: super: { abook = pkgs.writeScriptBin "dummy-abook" ""; }) ]; + nmt.script = '' assertFileExists home-files/.config/abook/abookrc assertFileContent home-files/.config/abook/abookrc ${./with-settings.cfg} diff --git a/tests/modules/programs/rofi/assert-on-both-theme-and-colors.nix b/tests/modules/programs/rofi/assert-on-both-theme-and-colors.nix index 0f9cfc39a..f162a486b 100644 --- a/tests/modules/programs/rofi/assert-on-both-theme-and-colors.nix +++ b/tests/modules/programs/rofi/assert-on-both-theme-and-colors.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: with lib; @@ -20,6 +20,9 @@ with lib; home.file.result.text = builtins.toJSON (map (a: a.message) (filter (a: !a.assertion) config.assertions)); + nixpkgs.overlays = + [ (self: super: { rofi = pkgs.writeScriptBin "dummy-rofi" ""; }) ]; + nmt.script = '' assertFileContent \ home-files/result \