Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / warcio / default.nix
blob3121a49b5b28decd2b68b91461cb7e31d36be9e8
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , fetchpatch
5 , httpbin
6 , multidict
7 , pytestCheckHook
8 , pythonOlder
9 , requests
10 , setuptools
11 , six
12 , wsgiprox
15 buildPythonPackage rec {
16   pname = "warcio";
17   version = "1.7.4";
18   format = "setuptools";
20   disabled = pythonOlder "3.7";
22   src = fetchFromGitHub {
23     owner = "webrecorder";
24     repo = "warcio";
25     rev = "aa702cb321621b233c6e5d2a4780151282a778be"; # Repo has no git tags, see https://github.com/webrecorder/warcio/issues/126
26     hash = "sha256-wn2rd73wRfOqHu9H0GIn76tmEsERBBCQatnk4b/JToU=";
27   };
29   patches = [
30     (fetchpatch {
31       # Add offline mode to skip tests that require an internet connection, https://github.com/webrecorder/warcio/pull/135
32       name = "add-offline-option.patch";
33       url = "https://github.com/webrecorder/warcio/pull/135/commits/2546fe457c57ab0b391764a4ce419656458d9d07.patch";
34       hash = "sha256-3izm9LvAeOFixiIUUqmd5flZIxH92+NxL7jeu35aObQ=";
35     })
36   ];
38   propagatedBuildInputs = [
39     six
40     setuptools
41   ];
43   nativeCheckInputs = [
44     httpbin
45     multidict # Optional. Without this, one test in test/test_utils.py is skipped.
46     pytestCheckHook
47     requests
48     wsgiprox
49   ];
51   pytestFlagsArray = [
52     "--offline"
53   ];
55   disabledTests = [
56     # Tests require network access, see above
57     "test_get_cache_to_file"
58   ];
60   pythonImportsCheck = [
61     "warcio"
62   ];
64   meta = with lib; {
65     description = "Streaming WARC/ARC library for fast web archive IO";
66     mainProgram = "warcio";
67     homepage = "https://github.com/webrecorder/warcio";
68     changelog = "https://github.com/webrecorder/warcio/blob/master/CHANGELIST.rst";
69     license = licenses.asl20;
70     maintainers = with maintainers; [ Luflosi ];
71   };