2012-01-03 01:16:29 +01:00
|
|
|
with import <nix/config.nix>;
|
|
|
|
|
2012-04-14 18:48:11 +02:00
|
|
|
{ derivations, manifest }:
|
2003-11-19 18:27:16 +01:00
|
|
|
|
2012-12-04 14:20:36 +01:00
|
|
|
derivation {
|
2003-11-19 18:27:16 +01:00
|
|
|
name = "user-environment";
|
2012-04-14 18:48:11 +02:00
|
|
|
system = builtins.currentSystem;
|
2016-08-11 13:58:33 +02:00
|
|
|
builder = nixLibexecDir + "/nix/buildenv";
|
2012-12-04 14:20:36 +01:00
|
|
|
|
2016-01-18 15:06:36 +01:00
|
|
|
inherit manifest;
|
2007-04-28 00:40:59 +02:00
|
|
|
|
|
|
|
# !!! grmbl, need structured data for passing this in a clean way.
|
2012-12-04 14:20:36 +01:00
|
|
|
derivations =
|
|
|
|
map (d:
|
2012-12-04 14:30:34 +01:00
|
|
|
[ (d.meta.active or "true")
|
2012-12-04 14:20:36 +01:00
|
|
|
(d.meta.priority or 5)
|
|
|
|
(builtins.length d.outputs)
|
|
|
|
] ++ map (output: builtins.getAttr output d) d.outputs)
|
|
|
|
derivations;
|
2010-08-04 14:13:58 +02:00
|
|
|
|
|
|
|
# Building user environments remotely just causes huge amounts of
|
|
|
|
# network traffic, so don't do that.
|
|
|
|
preferLocalBuild = true;
|
2012-05-10 04:14:36 +02:00
|
|
|
|
2016-01-18 15:06:36 +01:00
|
|
|
# Also don't bother substituting.
|
|
|
|
allowSubstitutes = false;
|
|
|
|
|
2015-11-13 07:51:52 +01:00
|
|
|
__sandboxProfile = ''
|
|
|
|
(allow sysctl-read)
|
|
|
|
(allow file-read*
|
|
|
|
(literal "/usr/lib/libSystem.dylib")
|
|
|
|
(literal "/usr/lib/libSystem.B.dylib")
|
|
|
|
(literal "/usr/lib/libobjc.A.dylib")
|
|
|
|
(literal "/usr/lib/libobjc.dylib")
|
|
|
|
(literal "/usr/lib/libauto.dylib")
|
|
|
|
(literal "/usr/lib/libc++abi.dylib")
|
|
|
|
(literal "/usr/lib/libc++.1.dylib")
|
|
|
|
(literal "/usr/lib/libDiagnosticMessagesClient.dylib")
|
|
|
|
(subpath "/usr/lib/system")
|
|
|
|
(subpath "/dev"))
|
|
|
|
'';
|
2015-09-29 18:03:19 +02:00
|
|
|
|
2015-03-24 11:15:45 +01:00
|
|
|
inherit chrootDeps;
|
2003-11-19 18:27:16 +01:00
|
|
|
}
|