push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchurl,
importlib-resources,
pytestCheckHook,
python,
pythonOlder,
setuptools,
}:
let
table = fetchurl {
# See https://github.com/dahlia/iso4217/blob/main/setup.py#L19
url = "https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-one.xml";
hash = "sha256-r1mRvI/qcOYOGKVzXHJGFdYxc+YlzpcdnWJExaF0Mp0=";
};
in
buildPythonPackage rec {
pname = "iso4217";
version = "1.14";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "dahlia";
repo = "iso4217";
tag = version;
hash = "sha256-lGXNSUBv/So3UgqXQ5AksqrCJVoyU8icDCfOda7Y5BE=";
};
build-system = [ setuptools ];
dependencies = lib.optionals (pythonOlder "3.9") [ importlib-resources ];
nativeCheckInputs = [ pytestCheckHook ];
preBuild = ''
# The table is already downloaded
export ISO4217_DOWNLOAD=0
# Copy the table file to satifiy the build process
cp -r ${table} iso4217/table.xml
'';
postInstall = ''
# Copy the table file
cp -r ${table} $out/${python.sitePackages}/iso4217/table.xml
'';
enabledTestPaths = [ "iso4217/test.py" ];
pythonImportsCheck = [ "iso4217" ];
meta = with lib; {
description = "ISO 4217 currency data package for Python";
homepage = "https://github.com/dahlia/iso4217";
license = with licenses; [ publicDomain ];
maintainers = with maintainers; [ fab ];
};
}