diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-10-05 17:06:23 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-10-11 15:15:14 +0000 |
commit | acb63e654e3c3a7e9f5b3bc55bb40d7287ffba7f (patch) | |
tree | ae60d3b5f10b8b1ea023ce43385142def1c39e90 | |
parent | 93aac5dac08d4d0bcf03ffce0c4995dfb65b15fc (diff) |
util-linux: disable locales properly
Removing the locales after they've been built and installed is a big hack when util-linux gives us an option to disable them directly. This way, the code in util-linux that deals with locales can be disabled as well, leading to a (very small) size reduction.
-rw-r--r-- | pkgs/os-specific/linux/util-linux/default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 089788aa8be34..294581b0e6857 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -1,5 +1,8 @@ { lib, stdenv, fetchurl, pkg-config, zlib, shadow, libcap_ng -, ncurses ? null, pam, systemd ? null, minimal ? false }: +, ncurses ? null, pam, systemd ? null +, minimal ? false +, nlsSupport ? !minimal +}: stdenv.mkDerivation rec { pname = "util-linux"; @@ -38,6 +41,7 @@ stdenv.mkDerivation rec { "--enable-fs-paths-default=/run/wrappers/bin:/run/current-system/sw/bin:/sbin" "--disable-makeinstall-setuid" "--disable-makeinstall-chown" "--disable-su" # provided by shadow + (lib.enableFeature nlsSupport "nls") (lib.withFeature (ncurses != null) "ncursesw") (lib.withFeature (systemd != null) "systemd") (lib.withFeatureAs (systemd != null) @@ -59,7 +63,7 @@ stdenv.mkDerivation rec { doCheck = false; # "For development purpose only. Don't execute on production system!" postInstall = lib.optionalString minimal '' - rm -rf $out/share/{locale,doc,bash-completion} + rm -rf $out/share/{doc,bash-completion} ''; enableParallelBuilding = true; |