Merge pull request 'speed up machine_flake eval' (#252) from Mic92-main into main
All checks were successful
checks-impure / test (push) Successful in 6s
checks / test (push) Successful in 48s

This commit is contained in:
clan-bot 2023-09-06 14:08:15 +00:00
commit 7fe3cc9f72
4 changed files with 7 additions and 4 deletions

2
.gitignore vendored
View File

@ -1,6 +1,6 @@
.direnv
result*
pkgs/clan-cli/clan_cli/nixpkgs
pkgs/clan-cli/clan_cli/deps_flake
pkgs/clan-cli/clan_cli/webui/assets
# python

View File

@ -48,6 +48,4 @@ def machine_flake(monkeymodule: pytest.MonkeyPatch) -> Generator[Path, None, Non
)
# check that an empty config is returned if no json file exists
monkeymodule.chdir(flake)
# monkeypatch get_clan_flake_toplevel to return the flake
monkeymodule.setattr("clan_cli.dirs.get_clan_flake_toplevel", lambda: flake)
yield flake

View File

@ -11,7 +11,12 @@
(if builtins.pathExists ./machines/machine1.json
then builtins.fromJSON (builtins.readFile ./machines/machine1.json)
else { })
{ nixpkgs.hostPlatform = "x86_64-linux"; }
{
nixpkgs.hostPlatform = "x86_64-linux";
# speed up by not instantiating nixpkgs twice and disable documentation
nixpkgs.pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
documentation.enable = false;
}
];
};
};