nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 69 lines 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 httpbin, 7 multidict, 8 pytestCheckHook, 9 requests, 10 setuptools, 11 six, 12 wsgiprox, 13 pytest-cov-stub, 14}: 15 16buildPythonPackage rec { 17 pname = "warcio"; 18 version = "1.7.5"; 19 format = "setuptools"; 20 21 src = fetchFromGitHub { 22 owner = "webrecorder"; 23 repo = "warcio"; 24 tag = "v${version}"; # Repo has no git tags, see https://github.com/webrecorder/warcio/issues/126 25 hash = "sha256-i1bVbXf1RQoWCADFwlVEnFhb3sVZ91vijUtzVLWMc2Q="; 26 }; 27 28 patches = [ 29 (fetchpatch { 30 # Add offline mode to skip tests that require an internet connection, https://github.com/webrecorder/warcio/pull/135 31 name = "add-offline-option.patch"; 32 url = "https://github.com/webrecorder/warcio/pull/135/commits/2546fe457c57ab0b391764a4ce419656458d9d07.patch"; 33 hash = "sha256-3izm9LvAeOFixiIUUqmd5flZIxH92+NxL7jeu35aObQ="; 34 }) 35 ]; 36 37 propagatedBuildInputs = [ 38 six 39 setuptools 40 ]; 41 42 nativeCheckInputs = [ 43 httpbin 44 multidict # Optional. Without this, one test in test/test_utils.py is skipped. 45 pytestCheckHook 46 requests 47 wsgiprox 48 pytest-cov-stub 49 ]; 50 51 pytestFlags = [ 52 "--offline" 53 ]; 54 55 disabledTestPaths = [ 56 "test/test_capture_http_proxy.py" 57 ]; 58 59 pythonImportsCheck = [ "warcio" ]; 60 61 meta = { 62 description = "Streaming WARC/ARC library for fast web archive IO"; 63 mainProgram = "warcio"; 64 homepage = "https://github.com/webrecorder/warcio"; 65 changelog = "https://github.com/webrecorder/warcio/blob/master/CHANGELIST.rst"; 66 license = lib.licenses.asl20; 67 maintainers = with lib.maintainers; [ Luflosi ]; 68 }; 69}