summary refs log tree commit diff
path: root/nixos/modules/config
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-04-07 16:00:09 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-04-07 16:00:09 +0200
commit710573ce6d3478e843ac4891d95185eadba6bd5e (patch)
treeb044be2f760e82dd19977fc40500541b52d93c1c /nixos/modules/config
parentd1df28f8e5b98be01417ffc1032020415390f2a0 (diff)
parent9a824f2f1dd01450e6f7270246f77210d4c9c2a5 (diff)
downloadnixlib-710573ce6d3478e843ac4891d95185eadba6bd5e.tar
nixlib-710573ce6d3478e843ac4891d95185eadba6bd5e.tar.gz
nixlib-710573ce6d3478e843ac4891d95185eadba6bd5e.tar.bz2
nixlib-710573ce6d3478e843ac4891d95185eadba6bd5e.tar.lz
nixlib-710573ce6d3478e843ac4891d95185eadba6bd5e.tar.xz
nixlib-710573ce6d3478e843ac4891d95185eadba6bd5e.tar.zst
nixlib-710573ce6d3478e843ac4891d95185eadba6bd5e.zip
Merge #12653: rework default outputs
Diffstat (limited to 'nixos/modules/config')
-rw-r--r--nixos/modules/config/debug-info.nix2
-rw-r--r--nixos/modules/config/system-path.nix17
2 files changed, 7 insertions, 12 deletions
diff --git a/nixos/modules/config/debug-info.nix b/nixos/modules/config/debug-info.nix
index a096a9809cee..17cb862d2916 100644
--- a/nixos/modules/config/debug-info.nix
+++ b/nixos/modules/config/debug-info.nix
@@ -38,7 +38,7 @@ with lib;
     # environment.pathsToLink, and we can't have both.
     #environment.pathsToLink = [ "/lib/debug/.build-id" ];
 
-    environment.outputsToLink =
+    environment.extraOutputsToInstall =
       optional config.environment.enableDebugInfo "debug";
 
   };
diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix
index 3df7d7cdac4f..d7815324c4c4 100644
--- a/nixos/modules/config/system-path.nix
+++ b/nixos/modules/config/system-path.nix
@@ -73,11 +73,11 @@ in
         description = "List of directories to be symlinked in <filename>/run/current-system/sw</filename>.";
       };
 
-      outputsToLink = mkOption {
+      extraOutputsToInstall = mkOption {
         type = types.listOf types.str;
         default = [ ];
-        example = [ "doc" ];
-        description = "List of package outputs to be symlinked into <filename>/run/current-system/sw</filename>.";
+        example = [ "doc" "info" "docdev" ];
+        description = "List of additional package outputs to be symlinked into <filename>/run/current-system/sw</filename>.";
       };
 
     };
@@ -120,18 +120,13 @@ in
         "/share/vim-plugins"
       ];
 
-    environment.outputsToLink = [ "bin" "lib" "out" ];
-
     system.path = pkgs.buildEnv {
       name = "system-path";
-      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;
+      paths = config.environment.systemPackages;
+      inherit (config.environment) pathsToLink extraOutputsToInstall;
       ignoreCollisions = true;
       # !!! Hacky, should modularise.
+      # outputs TODO: note that the tools will often not be linked by default
       postBuild =
         ''
           if [ -x $out/bin/update-mime-database -a -w $out/share/mime ]; then