mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59: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 = [
|
nixpkgs.overlays = [
|
||||||
(self: super: {
|
(self: super: {
|
||||||
firefox-unwrapped = pkgs.runCommand "firefox-0" {
|
firefox-unwrapped = pkgs.runCommandLocal "firefox-0" {
|
||||||
meta.description = "I pretend to be Firefox";
|
meta.description = "I pretend to be Firefox";
|
||||||
preferLocalBuild = true;
|
|
||||||
allowSubstitutes = false;
|
|
||||||
} ''
|
} ''
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out/bin"
|
||||||
touch "$out/bin/firefox"
|
touch "$out/bin/firefox"
|
||||||
chmod 755 "$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 = [
|
nixpkgs.overlays = [
|
||||||
(self: super: {
|
(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";
|
mpvDummy = pkgs.runCommandLocal "mpv" { } "mkdir $out";
|
||||||
mpvScript =
|
mpvScript =
|
||||||
pkgs.runCommandLocal "mpvScript" { scriptName = "something"; }
|
pkgs.runCommandLocal "mpvScript" { scriptName = "something"; }
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixpkgs.overlays =
|
||||||
|
[ (self: super: { terminator = pkgs.writeScriptBin "dummy" ""; }) ];
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileContent home-files/.config/terminator/config ${
|
assertFileContent home-files/.config/terminator/config ${
|
||||||
pkgs.writeText "expected" ''
|
pkgs.writeText "expected" ''
|
||||||
|
|
|
@ -6,6 +6,10 @@ with lib;
|
||||||
config = {
|
config = {
|
||||||
services.syncthing.tray = true;
|
services.syncthing.tray = true;
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(self: super: { syncthingtray-minimal = pkgs.writeScriptBin "dummy" ""; })
|
||||||
|
];
|
||||||
|
|
||||||
test.asserts.warnings.expected = [
|
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."
|
"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 = {
|
config = {
|
||||||
services.syncthing.tray.enable = true;
|
services.syncthing.tray.enable = true;
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(self: super: {
|
||||||
|
syncthingtray-minimal =
|
||||||
|
pkgs.runCommandLocal "syncthingtray" { pname = "syncthingtray"; }
|
||||||
|
"mkdir $out";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.config/systemd/user/syncthingtray.service
|
assertFileExists home-files/.config/systemd/user/syncthingtray.service
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue