2012-01-03 00:16:29 +00:00
|
|
|
with import <nix/config.nix>;
|
|
|
|
|
2012-04-14 16:48:11 +00:00
|
|
|
{ derivations, manifest }:
|
2003-11-19 17:27:16 +00:00
|
|
|
|
2012-12-04 13:20:36 +00:00
|
|
|
derivation {
|
2003-11-19 17:27:16 +00:00
|
|
|
name = "user-environment";
|
2012-04-14 16:48:11 +00:00
|
|
|
system = builtins.currentSystem;
|
2012-01-03 00:16:29 +00:00
|
|
|
builder = perl;
|
|
|
|
args = [ "-w" ./buildenv.pl ];
|
2012-12-04 13:20:36 +00:00
|
|
|
|
2003-11-19 17:27:16 +00:00
|
|
|
manifest = manifest;
|
2007-04-27 22:40:59 +00:00
|
|
|
|
|
|
|
# !!! grmbl, need structured data for passing this in a clean way.
|
2012-12-04 13:20:36 +00:00
|
|
|
derivations =
|
|
|
|
map (d:
|
2012-12-04 13:30:34 +00:00
|
|
|
[ (d.meta.active or "true")
|
2012-12-04 13:20:36 +00:00
|
|
|
(d.meta.priority or 5)
|
|
|
|
(builtins.length d.outputs)
|
|
|
|
] ++ map (output: builtins.getAttr output d) d.outputs)
|
|
|
|
derivations;
|
2010-08-04 12:13:58 +00:00
|
|
|
|
|
|
|
# Building user environments remotely just causes huge amounts of
|
|
|
|
# network traffic, so don't do that.
|
|
|
|
preferLocalBuild = true;
|
2012-05-10 02:14:36 +00:00
|
|
|
|
2015-11-08 19:18:15 +00:00
|
|
|
__impureHostDeps = if builtins.currentSystem == "x86_64-darwin" then [
|
2015-09-29 16:03:19 +00:00
|
|
|
"/usr/lib/libSystem.dylib"
|
|
|
|
"/usr/lib/system"
|
2015-11-08 19:18:15 +00:00
|
|
|
] else null;
|
2015-09-29 16:03:19 +00:00
|
|
|
|
2015-03-24 10:15:45 +00:00
|
|
|
inherit chrootDeps;
|
2003-11-19 17:27:16 +00:00
|
|
|
}
|