Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at master 1.7 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 setuptools, 7 boilerpy3, 8 cdxj-indexer, 9 frictionless, 10 pytest-cov, 11 pyyaml, 12 shortuuid, 13 pytestCheckHook, 14}: 15 16buildPythonPackage rec { 17 pname = "wacz"; 18 version = "0.5.0"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "webrecorder"; 23 repo = "py-wacz"; 24 tag = "v${version}"; 25 hash = "sha256-bGY6G7qBAN1Vu+pTNqRG0xh34sR62pMhQFHFGlJaTPQ="; 26 }; 27 28 patches = [ 29 # <https://github.com/webrecorder/py-wacz/pull/47> 30 (fetchpatch { 31 name = "clean-up-deps.patch"; 32 url = "https://github.com/webrecorder/py-wacz/compare/1e8f724a527f28855eedeb0d969ee39b00b2a80a...9d3ad60f125247b8a4354511d9123b85ce6a23c5.patch"; 33 hash = "sha256-zH6BKhsq9ybjzaWcNbVkk1sWh8vVCkv7Qxuwl0MQhNM="; 34 }) 35 ]; 36 37 postPatch = '' 38 substituteInPlace setup.py \ 39 --replace "pytest-runner" "" 40 ''; 41 42 build-system = [ 43 setuptools 44 ]; 45 46 dependencies = [ 47 boilerpy3 48 cdxj-indexer 49 frictionless 50 pyyaml 51 shortuuid 52 ] 53 ++ frictionless.optional-dependencies.json; 54 55 optional-dependencies = { 56 # signing = [ 57 # authsign # not packaged 58 # ]; 59 }; 60 61 nativeCheckInputs = [ 62 pytestCheckHook 63 pytest-cov 64 ]; 65 66 disabledTests = [ 67 # authsign is not packaged 68 "test_verify_signed" 69 ]; 70 71 pythonImportsCheck = [ 72 "wacz" 73 ]; 74 75 meta = { 76 description = "Utility for working with web archive data using the WACZ format specification"; 77 homepage = "https://github.com/webrecorder/py-wacz"; 78 changelog = "https://github.com/webrecorder/py-wacz/blob/${src.rev}/CHANGES.md"; 79 license = lib.licenses.mit; 80 maintainers = with lib.maintainers; [ zhaofengli ]; 81 mainProgram = "wacz"; 82 }; 83}