at master 1.3 kB view raw
1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 fetchFromGitLab, 6 pkg-config, 7 setuptools, 8 pytestCheckHook, 9 six, 10 icu, 11}: 12 13buildPythonPackage rec { 14 pname = "pyicu"; 15 version = "2.15.2"; 16 pyproject = true; 17 18 src = fetchFromGitLab { 19 domain = "gitlab.pyicu.org"; 20 owner = "main"; 21 repo = "pyicu"; 22 tag = "v${version}"; 23 hash = "sha256-Div3c4Lk9VTV1HrmvYKDn1a7moDNjG4OHA9Kv3+niKs="; 24 }; 25 26 postPatch = '' 27 substituteInPlace setup.py --replace-fail "'pkg-config'" "'${stdenv.cc.targetPrefix}pkg-config'" 28 ''; 29 30 build-system = [ setuptools ]; 31 32 nativeBuildInputs = [ pkg-config ]; 33 34 buildInputs = [ icu ]; 35 36 nativeCheckInputs = [ 37 pytestCheckHook 38 six 39 ]; 40 41 disabledTestPaths = [ 42 # AssertionError: '$' != 'US Dollar' 43 "test/test_NumberFormatter.py::TestCurrencyUnit::testGetName" 44 # AssertionError: Lists differ: ['a', 'b', 'c', 'd'] != ['a', 'b', 'c', 'd', ... 45 "test/test_UnicodeSet.py::TestUnicodeSet::testIterators" 46 ]; 47 48 pythonImportsCheck = [ "icu" ]; 49 50 meta = with lib; { 51 homepage = "https://gitlab.pyicu.org/main/pyicu"; 52 description = "Python extension wrapping the ICU C++ API"; 53 changelog = "https://gitlab.pyicu.org/main/pyicu/-/raw/v${version}/CHANGES"; 54 license = licenses.mit; 55 }; 56}