Merge pull request 'speed up machine_flake eval' (#252) from Mic92-main into main
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,6 +1,6 @@
|
|||||||
.direnv
|
.direnv
|
||||||
result*
|
result*
|
||||||
pkgs/clan-cli/clan_cli/nixpkgs
|
pkgs/clan-cli/clan_cli/deps_flake
|
||||||
pkgs/clan-cli/clan_cli/webui/assets
|
pkgs/clan-cli/clan_cli/webui/assets
|
||||||
|
|
||||||
# python
|
# python
|
||||||
|
|||||||
@@ -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
|
# check that an empty config is returned if no json file exists
|
||||||
monkeymodule.chdir(flake)
|
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
|
yield flake
|
||||||
|
|||||||
0
pkgs/clan-cli/tests/machine_flake/.clan-flake
Normal file
0
pkgs/clan-cli/tests/machine_flake/.clan-flake
Normal file
@@ -11,7 +11,12 @@
|
|||||||
(if builtins.pathExists ./machines/machine1.json
|
(if builtins.pathExists ./machines/machine1.json
|
||||||
then builtins.fromJSON (builtins.readFile ./machines/machine1.json)
|
then builtins.fromJSON (builtins.readFile ./machines/machine1.json)
|
||||||
else { })
|
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;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user