mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
nixos/documentation.nix: Only use store non-flake pkgs.path directly when already copied
This commit is contained in:
parent
15a00be189
commit
fecf325059
@ -71,8 +71,14 @@ let
|
||||
# produce separate, smaller store paths
|
||||
# When already in the store,
|
||||
# avoid copying; reuse the whole nixpkgs sources
|
||||
#
|
||||
# We can only avoid copying when pkgs.path is already a string. A path
|
||||
# value can not be converted to a store path without rehashing it.
|
||||
# builtins.storePath would be a solution but is currently off-limits
|
||||
# because of https://github.com/NixOS/nix/issues/1888
|
||||
# and https://github.com/NixOS/nix/issues/5868
|
||||
pull = dir:
|
||||
if isStorePath pkgs.path
|
||||
if builtins.typeOf pkgs.path == "string" && isStorePath pkgs.path
|
||||
then "${pkgs.path}/${dir}"
|
||||
else filter "${toString pkgs.path}/${dir}";
|
||||
in
|
||||
|
Loading…
Reference in New Issue
Block a user