python.pkgs.docutils: set LANG in case of darwin and python3

This should allow the Python3 version to be built while preventing mass-rebuilds.
This commit is contained in:
Frederik Rietdijk 2018-12-01 09:12:34 +01:00
parent 62a1bc0031
commit 81567cb828

View file

@ -1,4 +1,5 @@
{ lib { stdenv
, lib
, fetchurl , fetchurl
, buildPythonPackage , buildPythonPackage
, isPy3k , isPy3k
@ -14,11 +15,13 @@ buildPythonPackage rec {
sha256 = "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"; sha256 = "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji";
}; };
checkPhase = if isPy3k then '' # 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 ''
${python.interpreter} test3/alltests.py ${python.interpreter} test3/alltests.py
'' else '' '' else ''
${python.interpreter} test/alltests.py ${python.interpreter} test/alltests.py
''; '');
# Create symlinks lacking a ".py" suffix, many programs depend on these names # Create symlinks lacking a ".py" suffix, many programs depend on these names
postFixup = '' postFixup = ''