pythonPackages.cchardet: fix build on non-x86_64

This commit is contained in:
Markus S. Wamser 2022-02-06 15:02:59 +01:00
parent e3ae569a2c
commit 34afacfd78

View file

@ -1,4 +1,5 @@
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, python
@ -20,9 +21,14 @@ buildPythonPackage rec {
checkInputs = [ nose ];
# on non x86-64 some charsets are identified as their superset, so we skip these tests (last checked with version 2.1.7)
preCheck = ''
cp -R src/tests $TMPDIR
pushd $TMPDIR
'' + lib.optionalString (stdenv.hostPlatform.system != "x86_64-linux") ''
rm $TMPDIR/tests/testdata/th/tis-620.txt # identified as iso-8859-11, which is fine for all practical purposes
rm $TMPDIR/tests/testdata/ga/iso-8859-1.txt # identified as windows-1252, which is fine for all practical purposes
rm $TMPDIR/tests/testdata/fi/iso-8859-1.txt # identified as windows-1252, which is fine for all practical purposes
'';
checkPhase = ''