git.iko.soy/typeable/nixpkgs
on master help sign in
python3Packages.cwcwidth: fix tests on darwin

use the same locale settings used by upstream's CI: https://github.com/sebastinas/cwcwidth/blob/2bc4360474b524148ffde3c8b837cbb0a4f172f5/.github/workflows/build.yaml#L33 this has the effect of skipping some otherwise-failing tests on darwin. seems slightly counterproductive but who am i to judge?

commit712b402565e53a0e00113e9b617d4edd428d158c authorRobert Scott <code@humanleg.org.uk> dateMon 22 Nov 2021, 23:24 (5 years ago) parent67c9d4a
1 file changed+7−2
pkgs/development/python-modules/cwcwidth/default.nix+7−2
pkgs/development/python-modules/cwcwidth/default.nix+7−2
@@ -13,12 +13,17 @@ buildPythonPackage rec {
1313 nativeBuildInputs = [ cython ];
1414
1515 checkInputs = [ pytestCheckHook ];
16− # Hack needed to make pytest + cython work
17− # https://github.com/NixOS/nixpkgs/pull/82410#issuecomment-827186298
1816 preCheck = ''
17+ # Hack needed to make pytest + cython work
18+ # https://github.com/NixOS/nixpkgs/pull/82410#issuecomment-827186298
1919 export HOME=$(mktemp -d)
2020 cp -r $TMP/$sourceRoot/tests $HOME
2121 pushd $HOME
22+
23+ # locale settings used by upstream, has the effect of skipping
24+ # otherwise-failing tests on darwin
25+ export LC_ALL='C.UTF-8'
26+ export LANG='C.UTF-8'
2227 '';
2328 postCheck = "popd";
2429