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