From 00f3a816a9abf3fc4f0b5101786eb9208fc44532 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sun, 6 Mar 2011 15:39:05 +0000 Subject: [PATCH] Adding a possibility to add more paths to chroots used by nix-daemons. The use-case is building the latest version from repository with very large checkouts. That way you do not get extra copy in store every time you rebuild, and you can implement a saner version checking than checksumming all the data svn path=/nixos/trunk/; revision=26174 --- modules/services/misc/nix-daemon.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/services/misc/nix-daemon.nix b/modules/services/misc/nix-daemon.nix index 2be7789cc5fa9fb..aa4947adad6d87a 100644 --- a/modules/services/misc/nix-daemon.nix +++ b/modules/services/misc/nix-daemon.nix @@ -69,6 +69,16 @@ in This option allows to append lines to nix.conf. "; }; + + extraChrootPaths = mkOption { + default = []; + example = ["/var/dist"]; + description = '' + Extra paths to include in chroot. May be useful if you build + from private repository mirrors to avoid extra checksumming + and copying to store. + ''; + }; distributedBuilds = mkOption { default = false; @@ -176,7 +186,6 @@ in you should increase this value. ''; }; - }; }; @@ -211,7 +220,7 @@ in build-users-group = nixbld build-max-jobs = ${toString (config.nix.maxJobs)} build-use-chroot = ${if config.nix.useChroot then "true" else "false"} - build-chroot-dirs = /dev /dev/pts /proc /bin $(echo $extraPaths) + build-chroot-dirs = /dev /dev/pts /proc /bin $(echo $extraPaths) ${builtins.toString config.nix.extraChrootPaths} $extraOptions END '';