2020-04-19 13:41:18 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, lib, ...} : let
|
|
|
|
|
2020-12-15 19:25:00 +00:00
|
|
|
customPkgs = pkgs.appendOverlays [ (self: super: {
|
|
|
|
hello = super.hello.overrideAttrs (old: {
|
|
|
|
name = "custom-hello";
|
2020-04-19 13:41:18 +00:00
|
|
|
});
|
2020-12-15 19:25:00 +00:00
|
|
|
}) ];
|
2020-04-19 13:41:18 +00:00
|
|
|
|
|
|
|
in {
|
2020-12-15 19:24:57 +00:00
|
|
|
name = "containers-custom-pkgs";
|
2020-04-19 13:41:18 +00:00
|
|
|
meta = with lib.maintainers; {
|
2020-12-15 19:25:00 +00:00
|
|
|
maintainers = [ adisbladis earvstedt ];
|
2020-04-19 13:41:18 +00:00
|
|
|
};
|
|
|
|
|
2020-12-15 19:25:00 +00:00
|
|
|
machine = { config, ... }: {
|
|
|
|
assertions = let
|
|
|
|
helloName = (builtins.head config.containers.test.config.system.extraDependencies).name;
|
|
|
|
in [ {
|
|
|
|
assertion = helloName == "custom-hello";
|
|
|
|
message = "Unexpected value: ${helloName}";
|
|
|
|
} ];
|
|
|
|
|
2020-12-15 19:24:57 +00:00
|
|
|
containers.test = {
|
|
|
|
autoStart = true;
|
2020-12-15 19:25:00 +00:00
|
|
|
config = { pkgs, config, ... }: {
|
|
|
|
nixpkgs.pkgs = customPkgs;
|
|
|
|
system.extraDependencies = [ pkgs.hello ];
|
2020-04-19 13:41:18 +00:00
|
|
|
};
|
|
|
|
};
|
2020-12-15 19:24:57 +00:00
|
|
|
};
|
2020-04-19 13:41:18 +00:00
|
|
|
|
2020-12-15 19:25:00 +00:00
|
|
|
# This test only consists of evaluating the test machine
|
|
|
|
testScript = "";
|
2020-04-19 13:41:18 +00:00
|
|
|
})
|