Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 pytestCheckHook, 7}: 8 9buildPythonPackage rec { 10 pname = "vat-moss"; 11 version = "0.11.0"; 12 format = "setuptools"; 13 14 src = fetchFromGitHub { 15 owner = "raphaelm"; 16 repo = "vat_moss-python"; 17 rev = version; 18 hash = "sha256-c0lcyeW8IUhWKcfn3BmsbNmHyAzm8T0sdYp0Zp0FbFw="; 19 }; 20 21 patches = [ 22 (fetchpatch { 23 # Update API URL to HTTPS 24 url = "https://github.com/raphaelm/vat_moss-python/commit/ed32b7d893da101332d3bb202d17b1bf89e5d9ed.patch"; 25 hash = "sha256-GpxaQ6/1LdFdxzXT/p4HS7FHU0WeM0i3LbdRFeqnFdw="; 26 }) 27 ]; 28 29 pythonImportsCheck = [ "vat_moss" ]; 30 31 nativeCheckInputs = [ pytestCheckHook ]; 32 33 disabledTests = [ "test_fetch" ]; 34 35 disabledTestPaths = [ 36 # network access 37 "tests/test_id.py" 38 ]; 39 40 meta = with lib; { 41 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"; 42 homepage = "https://github.com/raphaelm/vat_moss-python"; 43 changelog = "https://github.com/raphaelm/vat_moss-python/blob/${src.rev}/changelog.md"; 44 license = licenses.mit; 45 maintainers = with maintainers; [ hexa ]; 46 }; 47}