summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2022-01-27 12:33:16 +0100
committerRobert Hensing <robert@roberthensing.nl>2022-01-27 12:35:16 +0100
commitaa877346f8cf9a12da8402d5f7e2097b8136890c (patch)
tree7e8f92626ef9884898bf4700f15b38c425f912e8 /nixos
parent647b304306b5d483294754faf1951fe788d060c2 (diff)
downloadnixpkgs-aa877346f8cf9a12da8402d5f7e2097b8136890c.tar
nixpkgs-aa877346f8cf9a12da8402d5f7e2097b8136890c.tar.gz
nixpkgs-aa877346f8cf9a12da8402d5f7e2097b8136890c.tar.bz2
nixpkgs-aa877346f8cf9a12da8402d5f7e2097b8136890c.tar.lz
nixpkgs-aa877346f8cf9a12da8402d5f7e2097b8136890c.tar.xz
nixpkgs-aa877346f8cf9a12da8402d5f7e2097b8136890c.tar.zst
nixpkgs-aa877346f8cf9a12da8402d5f7e2097b8136890c.zip
Revert "nixos/documentation: avoid copying nixpkgs subpaths, iteration 2"
This reverts commit 15a00be189be329f488986cd72d7315fa643b89a.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/misc/documentation.nix14
1 files changed, 3 insertions, 11 deletions
diff --git a/nixos/modules/misc/documentation.nix b/nixos/modules/misc/documentation.nix
index 361815b48d5..b7746ddc211 100644
--- a/nixos/modules/misc/documentation.nix
+++ b/nixos/modules/misc/documentation.nix
@@ -67,19 +67,11 @@ let
               (t == "directory" -> baseNameOf n != "tests")
               && (t == "file" -> hasSuffix ".nix" n)
             );
-        # When working directly from a checkout,
-        #   produce separate, smaller store paths
-        # When already in the store,
-        #   avoid copying; reuse the whole nixpkgs sources
-        pull = dir:
-          if isStorePath pkgs.path
-          then "${pkgs.path}/${dir}"
-          else filter "${toString pkgs.path}/${dir}";
       in
         pkgs.runCommand "lazy-options.json" {
-          libPath = pull "lib";
-          pkgsLibPath = pull "pkgs/pkgs-lib";
-          nixosPath = pull "nixos";
+          libPath = filter "${toString pkgs.path}/lib";
+          pkgsLibPath = filter "${toString pkgs.path}/pkgs/pkgs-lib";
+          nixosPath = filter "${toString pkgs.path}/nixos";
           modules = map (p: ''"${removePrefix "${modulesPath}/" (toString p)}"'') docModules.lazy;
         } ''
           export NIX_STORE_DIR=$TMPDIR/store