mach-nix/tests/test_flakes.nix

25 lines
594 B
Nix
Raw Normal View History

2020-10-12 03:54:19 +00:00
{
2021-06-09 06:11:17 +00:00
baseArgsMkPython ? {},
baseArgsBuildPythonPackage ? {},
2020-10-12 03:54:19 +00:00
mach-nix ? import ../. {},
system ? builtins.currentSystem or "x86_64-linux",
2020-10-12 03:54:19 +00:00
...
}:
with builtins;
let
pyEnv = (builtins.getFlake (toString ../.)).packages.${system}.gen.python.requests;
pyEnvDockerImage = (builtins.getFlake (toString ../.)).packages.${system}.gen.docker.requests;
2020-10-12 03:54:19 +00:00
in
(map (p:
if p ? _passthru.python.pkgs.requests then
p
else
throw "Error"
) [pyEnv pyEnvDockerImage])
++ [
2021-05-22 15:18:28 +00:00
(if ! pyEnv ? _passthru.python.pkgs.requests then
2020-10-12 03:54:19 +00:00
throw "Error with shell"
else
mach-nix.nixpkgs.hello)
]