2021-03-09 03:18:52 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, lib, ... }: let
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
customPkgs = pkgs.appendOverlays [ (self: super: {
|
|
|
|
hello = super.hello.overrideAttrs (old: {
|
|
|
|
name = "custom-hello";
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
2021-02-13 14:23:35 +00:00
|
|
|
}) ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
in {
|
2021-02-13 14:23:35 +00:00
|
|
|
name = "containers-custom-pkgs";
|
2021-03-09 03:18:52 +00:00
|
|
|
meta = {
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with lib.maintainers; [ erikarvstedt ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
nodes.machine = { config, ... }: {
|
2021-02-13 14:23:35 +00:00
|
|
|
assertions = let
|
|
|
|
helloName = (builtins.head config.containers.test.config.system.extraDependencies).name;
|
|
|
|
in [ {
|
|
|
|
assertion = helloName == "custom-hello";
|
|
|
|
message = "Unexpected value: ${helloName}";
|
|
|
|
} ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
containers.test = {
|
|
|
|
autoStart = true;
|
|
|
|
config = { pkgs, config, ... }: {
|
|
|
|
nixpkgs.pkgs = customPkgs;
|
|
|
|
system.extraDependencies = [ pkgs.hello ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
# This test only consists of evaluating the test machine
|
2021-05-20 23:08:51 +00:00
|
|
|
testScript = "pass";
|
2020-04-24 23:36:52 +00:00
|
|
|
})
|