1
0
Fork 0
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:
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 = [ 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
'';
}) })
]; ];

View file

@ -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"; }

View file

@ -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" ''

View file

@ -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."
]; ];

View file

@ -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
''; '';