1import ./make-test-python.nix (
2 { pkgs, lib, ... }:
3 let
4
5 customPkgs = pkgs.appendOverlays [
6 (self: super: {
7 hello = super.hello.overrideAttrs (old: {
8 name = "custom-hello";
9 });
10 })
11 ];
12
13 in
14 {
15 name = "containers-custom-pkgs";
16 meta = {
17 maintainers = with lib.maintainers; [ erikarvstedt ];
18 };
19
20 nodes.machine =
21 { config, ... }:
22 {
23 assertions =
24 let
25 helloName = (builtins.head config.containers.test.config.system.extraDependencies).name;
26 in
27 [
28 {
29 assertion = helloName == "custom-hello";
30 message = "Unexpected value: ${helloName}";
31 }
32 ];
33
34 containers.test = {
35 autoStart = true;
36 config =
37 { pkgs, config, ... }:
38 {
39 nixpkgs.pkgs = customPkgs;
40 system.extraDependencies = [ pkgs.hello ];
41 };
42 };
43 };
44
45 # This test only consists of evaluating the test machine
46 testScript = "pass";
47 }
48)