diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 49279c4b578..4d5a5121a45 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -59,6 +59,7 @@ , withCoredump ? true , withCompression ? true # adds bzip2, lz4 and xz , withCryptsetup ? true +, withDocumentation ? true , withEfi ? stdenv.hostPlatform.isEfi , withHostnamed ? true , withHwdb ? true @@ -390,7 +391,9 @@ stdenv.mkDerivation { # "kernel-install" shouldn't be used on NixOS. find $out -name "*kernel-install*" -exec rm {} \; - ''; # */ + '' + lib.optionalString (!withDocumentation) '' + rm -rf $out/share/doc + ''; enableParallelBuilding = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 760deb47013..48ec0679fc6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18666,6 +18666,7 @@ in withCompression = false; withCoredump = false; withCryptsetup = false; + withDocumentation = false; withEfi = false; withHostnamed = false; withHwdb = false;