diff --git a/pkgs/development/python-modules/click/default.nix b/pkgs/development/python-modules/click/default.nix index 295c6d51955d..4a96ef7f6730 100644 --- a/pkgs/development/python-modules/click/default.nix +++ b/pkgs/development/python-modules/click/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, substituteAll, glibc, pytest }: +{ stdenv, buildPythonPackage, fetchPypi, substituteAll, locale, pytest }: buildPythonPackage rec { pname = "click"; @@ -9,11 +9,12 @@ buildPythonPackage rec { sha256 = "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"; }; - patches = stdenv.lib.optionals (stdenv.isLinux && !stdenv.hostPlatform.isMusl) + patches = [ (substituteAll { src = ./fix-paths.patch; - locale = "${glibc.bin}/bin/locale"; - }); + locale = "${locale}/bin/locale"; + }) + ]; buildInputs = [ pytest ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b0884fe5688c..b6d0f3695321 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21639,7 +21639,7 @@ with pkgs; unixtools = recurseIntoAttrs (callPackages ./unix-tools.nix { }); inherit (unixtools) hexdump ps logger eject umount mount wall hostname more sysctl getconf - getent; + getent locale; fts = if hostPlatform.isMusl then netbsd.fts else null; diff --git a/pkgs/top-level/unix-tools.nix b/pkgs/top-level/unix-tools.nix index 1bcf93754cd7..362715e82623 100644 --- a/pkgs/top-level/unix-tools.nix +++ b/pkgs/top-level/unix-tools.nix @@ -85,6 +85,7 @@ let }; locale = { linux = pkgs.glibc; + darwin = pkgs.netbsd.locale; }; logger = { linux = pkgs.utillinux;