nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 marisa-trie,
5 fetchPypi,
6 pytestCheckHook,
7 language-data,
8 setuptools,
9 setuptools-scm,
10}:
11
12buildPythonPackage rec {
13 pname = "langcodes";
14 version = "3.5.1";
15 pyproject = true;
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-QL/zFeAbAdEcKuOSjdT1y9dN04+b2RLBK5o2BsFD9zE=";
20 };
21
22 build-system = [
23 setuptools
24 setuptools-scm
25 ];
26
27 dependencies = [
28 language-data
29 marisa-trie
30 setuptools # pkg_resources import in language_data/util.py
31 ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 disabledTests = [
36 # AssertionError: assert 'Unknown language [aqk]' == 'Aninka'
37 "test_updated_iana"
38 # doctest mismatches
39 "speaking_population"
40 "writing_population"
41 "README.md"
42 ];
43
44 pythonImportsCheck = [ "langcodes" ];
45
46 meta = {
47 description = "Python toolkit for working with and comparing the standardized codes for languages";
48 homepage = "https://github.com/georgkrause/langcodes";
49 license = lib.licenses.mit;
50 };
51}