From 1fccd255953b6025a4d0342c2cf5641e5b6b6ced Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Fri, 15 Feb 2019 13:30:59 +0100 Subject: [PATCH] buildPythonPackage: always export `LANG=C.UTF-8` --- doc/languages-frameworks/python.section.md | 1 - nixos/doc/manual/release-notes/rl-1903.xml | 8 +++++++- .../interpreters/python/mk-python-derivation.nix | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index 36a87c8380f..1c9f9fdebe4 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -881,7 +881,6 @@ example of such a situation is when `py.test` is used. ''; } ``` -- Unicode issues can typically be fixed by including `glibcLocales` in `buildInputs` and exporting `LC_ALL=en_US.utf-8`. - Tests that attempt to access `$HOME` can be fixed by using the following work-around before running tests (e.g. `preCheck`): `export HOME=$(mktemp -d)` ## FAQ diff --git a/nixos/doc/manual/release-notes/rl-1903.xml b/nixos/doc/manual/release-notes/rl-1903.xml index cba4c08708e..0785784f25a 100644 --- a/nixos/doc/manual/release-notes/rl-1903.xml +++ b/nixos/doc/manual/release-notes/rl-1903.xml @@ -158,12 +158,18 @@ - The buildPythonPackage now sets strictDeps = true + The buildPythonPackage function now sets strictDeps = true to help distinguish between native and non-native dependencies in order to improve cross-compilation compatibility. Note however that this may break user expressions. + + + The buildPythonPackage function now sets LANG = C.UTF-8 + to enable Unicode support. The glibcLocales package is no longer needed as a build input. + + The Syncthing state and configuration data has been moved from diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index 4142cb922f7..b7477c9b7b7 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -90,6 +90,8 @@ let self = toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attr # Enabled to detect some (native)BuildInputs mistakes strictDeps = true; + LANG = "${if python.stdenv.isDarwin then "en_US" else "C"}.UTF-8"; + # Python packages don't have a checkPhase, only an installCheckPhase doCheck = false; doInstallCheck = doCheck;