2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycountry";
|
2024-07-31 10:19:44 +00:00
|
|
|
version = "24.6.1";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pycountry";
|
|
|
|
repo = "pycountry";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-07-31 10:19:44 +00:00
|
|
|
hash = "sha256-4YVPh6OGWguqO9Ortv+vAejxx7WLs4u0SVLv8JlKSWM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postPatch = ''
|
2024-07-31 10:19:44 +00:00
|
|
|
sed -i "/addopts/d" pyproject.toml
|
|
|
|
sed -i "/pytest-cov/d" pyproject.toml
|
2024-04-21 15:54:59 +00:00
|
|
|
'';
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
build-system = [ poetry-core ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pycountry" ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/pycountry/pycountry";
|
|
|
|
changelog = "https://github.com/pycountry/pycountry/blob/${src.rev}/HISTORY.txt";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "ISO country, subdivision, language, currency and script definitions and their translations";
|
2024-04-21 15:54:59 +00:00
|
|
|
license = lib.licenses.lgpl21Plus;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|