From a6a88bffd58ca40ac528dd4886110a20acae3967 Mon Sep 17 00:00:00 2001 From: Dave Nicponski Date: Wed, 17 Apr 2019 00:31:56 -0400 Subject: [PATCH] python3.7-docutils: build fix on darwin Fix python docutils package for OSX. On a relatively clean new macbook, with latest OS Mojave 10.14.3, this package failed to build. A bit of searching led to: https://coderwall.com/p/-k_93g/mac-os-x-valueerror-unknown-locale-utf-8-in-python --- pkgs/development/python-modules/docutils/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/docutils/default.nix b/pkgs/development/python-modules/docutils/default.nix index f427f95ffaa..b4a4953eb94 100644 --- a/pkgs/development/python-modules/docutils/default.nix +++ b/pkgs/development/python-modules/docutils/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { # Only Darwin needs LANG, but we could set it in general. # It's done here conditionally to prevent mass-rebuilds. - checkPhase = lib.optionalString (isPy3k && stdenv.isDarwin) ''LANG="en_US.UTF-8" '' + (if isPy3k then '' + checkPhase = lib.optionalString (isPy3k && stdenv.isDarwin) ''LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" '' + (if isPy3k then '' ${python.interpreter} test3/alltests.py '' else '' ${python.interpreter} test/alltests.py