about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nixos/modules/config/system-path.nix20
-rw-r--r--nixos/modules/security/polkit.nix2
-rw-r--r--pkgs/build-support/buildenv/default.nix8
3 files changed, 11 insertions, 19 deletions
diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix
index da558a25d99b7..6b4cc9ebb7d8a 100644
--- a/nixos/modules/config/system-path.nix
+++ b/nixos/modules/config/system-path.nix
@@ -75,7 +75,7 @@ in
 
       outputsToLink = mkOption {
         type = types.listOf types.str;
-        default = [];
+        default = [ ];
         example = [ "doc" ];
         description = "List of package outputs to be symlinked into <filename>/run/current-system/sw</filename>.";
       };
@@ -120,18 +120,16 @@ in
         "/share/vim-plugins"
       ];
 
+    environment.outputsToLink = [ "bin" "lib" "out" ];
+
     system.path = pkgs.buildEnv {
       name = "system-path";
-      paths = let
-      inherit (config.environment) pathsToLink outputsToLink;
-        #outputs TODO: some code already merged by Eelco? make it user-customizable?
-        pkgOutputFun = pkg: lib.filter (p: p!=null) [
-          (pkg.bin or (pkg.out or pkg))
-          (pkg.man or null)
-          (pkg.info or null)
-          (pkg.doc or null)
-        ];
-        in lib.concatMap pkgOutputFun config.environment.systemPackages;
+      paths =
+        lib.filter (drv: drv != null && drv != (drv.dev or null))
+          (lib.concatMap (drv:
+            [ drv ] ++ map (outputName: drv.${outputName}.outPath or null) config.environment.outputsToLink)
+           config.environment.systemPackages);
+      inherit (config.environment) pathsToLink;
       ignoreCollisions = true;
       # !!! Hacky, should modularise.
       postBuild =
diff --git a/nixos/modules/security/polkit.nix b/nixos/modules/security/polkit.nix
index 507f81bbf0737..70e5e8b9fa741 100644
--- a/nixos/modules/security/polkit.nix
+++ b/nixos/modules/security/polkit.nix
@@ -59,7 +59,7 @@ in
 
   config = mkIf cfg.enable {
 
-    environment.systemPackages = [ pkgs.polkit.bin pkgs.polkit.out ];
+    environment.systemPackages = [ pkgs.polkit ];
 
     systemd.packages = [ pkgs.polkit.out ];
 
diff --git a/pkgs/build-support/buildenv/default.nix b/pkgs/build-support/buildenv/default.nix
index 5bcc1708e7fd3..6009abd9e3701 100644
--- a/pkgs/build-support/buildenv/default.nix
+++ b/pkgs/build-support/buildenv/default.nix
@@ -21,10 +21,6 @@
   # directories in the list is not symlinked.
   pathsToLink ? ["/"]
 
-, # The package outputs to include. By default, only the default
-  # output is included.
-  outputsToLink ? []
-
 , # Root the result in directory "$out${extraPrefix}", e.g. "/share".
   extraPrefix ? ""
 
@@ -40,9 +36,7 @@
 runCommand name
   rec { inherit manifest ignoreCollisions passthru pathsToLink extraPrefix postBuild buildInputs;
     pkgs = builtins.toJSON (map (drv: {
-      paths =
-        [ drv ]
-        ++ lib.concatMap (outputName: lib.optional (drv.${outputName}.outPath or null != null) drv.${outputName}) outputsToLink;
+      paths = [ drv ];
       priority = drv.meta.priority or 5;
     }) paths);
     preferLocalBuild = true;