From 7318ff0e385fde083d3bd2a0dcf0aedf88376124 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 4 Jun 2015 10:34:48 +0200 Subject: Add option ‘system.extraDependencies’ for including stuff in the system closure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mostly useful for installer tests that don't have network access. This generalizes virtualisation.pathsInNixDB and isoImage.storeContents. --- nixos/modules/system/activation/top-level.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'nixos/modules/system/activation/top-level.nix') diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index d7a1e205b4d4..b19fea57f6bf 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -81,6 +81,8 @@ let substituteAll ${./switch-to-configuration.pl} $out/bin/switch-to-configuration chmod +x $out/bin/switch-to-configuration + echo -n "${toString config.system.extraDependencies}" > $out/extra-dependencies + ${config.system.extraSystemBuilderCmds} ''; @@ -188,6 +190,16 @@ in ''; }; + system.extraDependencies = mkOption { + type = types.listOf types.package; + default = []; + description = '' + A list of packages that should be included in the system + closure but not otherwise made available to users. This is + primarily used by the installation tests. + ''; + }; + system.replaceRuntimeDependencies = mkOption { default = []; example = lib.literalExample "[ ({ original = pkgs.openssl; replacement = pkgs.callPackage /path/to/openssl { ... }; }) ]"; -- cgit 1.4.1