nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 39 lines 937 B view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 poetry-core, 6 pytestCheckHook, 7}: 8 9buildPythonPackage rec { 10 pname = "pycountry"; 11 version = "24.6.1"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "pycountry"; 16 repo = "pycountry"; 17 tag = version; 18 hash = "sha256-4YVPh6OGWguqO9Ortv+vAejxx7WLs4u0SVLv8JlKSWM="; 19 }; 20 21 postPatch = '' 22 sed -i "/addopts/d" pyproject.toml 23 sed -i "/pytest-cov/d" pyproject.toml 24 ''; 25 26 build-system = [ poetry-core ]; 27 28 nativeCheckInputs = [ pytestCheckHook ]; 29 30 pythonImportsCheck = [ "pycountry" ]; 31 32 meta = { 33 homepage = "https://github.com/pycountry/pycountry"; 34 changelog = "https://github.com/pycountry/pycountry/blob/${src.rev}/HISTORY.txt"; 35 description = "ISO country, subdivision, language, currency and script definitions and their translations"; 36 license = lib.licenses.lgpl21Plus; 37 maintainers = with lib.maintainers; [ dotlambda ]; 38 }; 39}