1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-18 12:38:30 +02:00

tests: prevent some unnecessary downloads

This commit is contained in:
Robert Helgesson 2021-06-23 00:19:41 +02:00
parent 04955ca970
commit 762f860cfb
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89
5 changed files with 34 additions and 3 deletions

View File

@ -11,15 +11,19 @@ with lib;
nixpkgs.overlays = [
(self: super: {
firefox-unwrapped = pkgs.runCommand "firefox-0" {
firefox-unwrapped = pkgs.runCommandLocal "firefox-0" {
meta.description = "I pretend to be Firefox";
preferLocalBuild = true;
allowSubstitutes = false;
} ''
mkdir -p "$out/bin"
touch "$out/bin/firefox"
chmod 755 "$out/bin/firefox"
'';
chrome-gnome-shell =
pkgs.runCommandLocal "dummy-chrome-gnome-shell" { } ''
mkdir -p $out/lib/mozilla/native-messaging-hosts
touch $out/lib/mozilla/native-messaging-hosts/dummy
'';
})
];

View File

@ -10,6 +10,18 @@
nixpkgs.overlays = [
(self: super: {
mpv-unwrapped = pkgs.runCommandLocal "mpv" {
version = "0";
passthru = {
lua.luaversion = "0";
luaEnv = "/dummy";
vapoursynthSupport = false;
};
} ''
mkdir -p $out/bin $out/Applications/mpv.app/Contents/MacOS
touch $out/bin/{,u}mpv $out/Applications/mpv.app/Contents/MacOS/mpv
chmod 755 $out/bin/{,u}mpv $out/Applications/mpv.app/Contents/MacOS/mpv
'';
mpvDummy = pkgs.runCommandLocal "mpv" { } "mkdir $out";
mpvScript =
pkgs.runCommandLocal "mpvScript" { scriptName = "something"; }

View File

@ -8,6 +8,9 @@
};
};
nixpkgs.overlays =
[ (self: super: { terminator = pkgs.writeScriptBin "dummy" ""; }) ];
nmt.script = ''
assertFileContent home-files/.config/terminator/config ${
pkgs.writeText "expected" ''

View File

@ -6,6 +6,10 @@ with lib;
config = {
services.syncthing.tray = true;
nixpkgs.overlays = [
(self: super: { syncthingtray-minimal = pkgs.writeScriptBin "dummy" ""; })
];
test.asserts.warnings.expected = [
"Specifying 'services.syncthing.tray' as a boolean is deprecated, set 'services.syncthing.tray.enable' instead. See https://github.com/nix-community/home-manager/pull/1257."
];

View File

@ -6,6 +6,14 @@ with lib;
config = {
services.syncthing.tray.enable = true;
nixpkgs.overlays = [
(self: super: {
syncthingtray-minimal =
pkgs.runCommandLocal "syncthingtray" { pname = "syncthingtray"; }
"mkdir $out";
})
];
nmt.script = ''
assertFileExists home-files/.config/systemd/user/syncthingtray.service
'';