Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 51 lines 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 pythonAtLeast, 7 pytestCheckHook, 8}: 9 10buildPythonPackage rec { 11 pname = "vat-moss"; 12 version = "0.11.0"; 13 format = "setuptools"; 14 15 # uses the removed cgi battery 16 disabled = pythonAtLeast "3.13"; 17 18 src = fetchFromGitHub { 19 owner = "raphaelm"; 20 repo = "vat_moss-python"; 21 rev = version; 22 hash = "sha256-c0lcyeW8IUhWKcfn3BmsbNmHyAzm8T0sdYp0Zp0FbFw="; 23 }; 24 25 patches = [ 26 (fetchpatch { 27 # Update API URL to HTTPS 28 url = "https://github.com/raphaelm/vat_moss-python/commit/ed32b7d893da101332d3bb202d17b1bf89e5d9ed.patch"; 29 hash = "sha256-GpxaQ6/1LdFdxzXT/p4HS7FHU0WeM0i3LbdRFeqnFdw="; 30 }) 31 ]; 32 33 pythonImportsCheck = [ "vat_moss" ]; 34 35 nativeCheckInputs = [ pytestCheckHook ]; 36 37 disabledTests = [ "test_fetch" ]; 38 39 disabledTestPaths = [ 40 # network access 41 "tests/test_id.py" 42 ]; 43 44 meta = with lib; { 45 description = "Python library for dealing with VAT MOSS and Norway VAT on digital services. Includes VAT ID validation, rate calculation based on place of supply, exchange rate and currency tools for invoices"; 46 homepage = "https://github.com/raphaelm/vat_moss-python"; 47 changelog = "https://github.com/raphaelm/vat_moss-python/blob/${src.rev}/changelog.md"; 48 license = licenses.mit; 49 maintainers = with maintainers; [ hexa ]; 50 }; 51}