14 # See https://github.com/dahlia/iso4217/blob/main/setup.py#L19
15 url = "https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-one.xml";
16 hash = "sha256-r1mRvI/qcOYOGKVzXHJGFdYxc+YlzpcdnWJExaF0Mp0=";
19 buildPythonPackage rec {
24 disabled = pythonOlder "3.7";
26 src = fetchFromGitHub {
29 rev = "refs/tags/${version}";
30 hash = "sha256-xOKfdk8Bn9f5oszS0IHUD6HgzL9VSa5GBZ28n4fvAck=";
33 build-system = [ setuptools ];
35 dependencies = lib.optionals (pythonOlder "3.9") [ importlib-resources ];
37 nativeCheckInputs = [ pytestCheckHook ];
40 # The table is already downloaded
41 export ISO4217_DOWNLOAD=0
42 # Copy the table file to satifiy the build process
43 cp -r ${table} iso4217/table.xml
48 cp -r ${table} $out/${python.sitePackages}/iso4217/table.xml
51 pytestFlagsArray = [ "iso4217/test.py" ];
53 pythonImportsCheck = [ "iso4217" ];
56 description = "ISO 4217 currency data package for Python";
57 homepage = "https://github.com/dahlia/iso4217";
58 license = with licenses; [ publicDomain ];
59 maintainers = with maintainers; [ fab ];