2021-02-26 18:03:49 +03:00
|
|
|
import ./make-test-python.nix ({ pkgs, lib, ... }: let
|
2020-04-19 16:41:18 +03:00
|
|
|
|
2020-12-15 22:25:00 +03:00
|
|
|
customPkgs = pkgs.appendOverlays [ (self: super: {
|
|
|
|
hello = super.hello.overrideAttrs (old: {
|
|
|
|
name = "custom-hello";
|
2020-04-19 16:41:18 +03:00
|
|
|
});
|
2020-12-15 22:25:00 +03:00
|
|
|
}) ];
|
2020-04-19 16:41:18 +03:00
|
|
|
|
|
|
|
in {
|
2020-12-15 22:24:57 +03:00
|
|
|
name = "containers-custom-pkgs";
|
2021-02-26 18:03:49 +03:00
|
|
|
meta = {
|
2022-06-26 20:12:18 +03:00
|
|
|
maintainers = with lib.maintainers; [ adisbladis erikarvstedt ];
|
2020-04-19 16:41:18 +03:00
|
|
|
};
|
|
|
|
|
2022-03-21 02:15:30 +03:00
|
|
|
nodes.machine = { config, ... }: {
|
2020-12-15 22:25:00 +03:00
|
|
|
assertions = let
|
|
|
|
helloName = (builtins.head config.containers.test.config.system.extraDependencies).name;
|
|
|
|
in [ {
|
|
|
|
assertion = helloName == "custom-hello";
|
|
|
|
message = "Unexpected value: ${helloName}";
|
|
|
|
} ];
|
|
|
|
|
2020-12-15 22:24:57 +03:00
|
|
|
containers.test = {
|
|
|
|
autoStart = true;
|
2020-12-15 22:25:00 +03:00
|
|
|
config = { pkgs, config, ... }: {
|
|
|
|
nixpkgs.pkgs = customPkgs;
|
|
|
|
system.extraDependencies = [ pkgs.hello ];
|
2020-04-19 16:41:18 +03:00
|
|
|
};
|
|
|
|
};
|
2020-12-15 22:24:57 +03:00
|
|
|
};
|
2020-04-19 16:41:18 +03:00
|
|
|
|
2020-12-15 22:25:00 +03:00
|
|
|
# This test only consists of evaluating the test machine
|
2021-05-08 23:59:12 +03:00
|
|
|
testScript = "pass";
|
2020-04-19 16:41:18 +03:00
|
|
|
})
|