mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
tests: prevent some unnecessary downloads
This commit is contained in:
parent
04955ca970
commit
762f860cfb
5 changed files with 34 additions and 3 deletions
|
@ -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
|
||||
'';
|
||||
})
|
||||
];
|
||||
|
||||
|
|
|
@ -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"; }
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
};
|
||||
};
|
||||
|
||||
nixpkgs.overlays =
|
||||
[ (self: super: { terminator = pkgs.writeScriptBin "dummy" ""; }) ];
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent home-files/.config/terminator/config ${
|
||||
pkgs.writeText "expected" ''
|
||||
|
|
|
@ -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."
|
||||
];
|
||||
|
|
|
@ -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
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue