My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/nixos/tests/containers-custom-pkgs.nix

34 lines
877 B

import ./make-test-python.nix ({ pkgs, lib, ... }: let
customPkgs = pkgs.appendOverlays [ (self: super: {
hello = super.hello.overrideAttrs (old: {
name = "custom-hello";
});
}) ];
in {
name = "containers-custom-pkgs";
meta = {
maintainers = with lib.maintainers; [ adisbladis earvstedt ];
};
nodes.machine = { config, ... }: {
assertions = let
helloName = (builtins.head config.containers.test.config.system.extraDependencies).name;
in [ {
assertion = helloName == "custom-hello";
message = "Unexpected value: ${helloName}";
} ];
containers.test = {
autoStart = true;
config = { pkgs, config, ... }: {
nixpkgs.pkgs = customPkgs;
system.extraDependencies = [ pkgs.hello ];
};
};
};
# This test only consists of evaluating the test machine
testScript = "pass";
})