Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / warcio / default.nix
blob935a538222bdf8887260297e3f4da5c84d4113f2
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , fetchpatch
5 , six
6 , setuptools
7 , pytestCheckHook
8 , httpbin
9 , requests
10 , wsgiprox
11 , multidict
14 buildPythonPackage rec {
15   pname = "warcio";
16   version = "1.7.4";
18   src = fetchFromGitHub {
19     owner = "webrecorder";
20     repo = "warcio";
21     rev = "aa702cb321621b233c6e5d2a4780151282a778be"; # Repo has no git tags, see https://github.com/webrecorder/warcio/issues/126
22     hash = "sha256-wn2rd73wRfOqHu9H0GIn76tmEsERBBCQatnk4b/JToU=";
23   };
25   patches = [
26     (fetchpatch {
27       name = "add-offline-option.patch";
28       url = "https://github.com/webrecorder/warcio/pull/135/commits/2546fe457c57ab0b391764a4ce419656458d9d07.patch";
29       hash = "sha256-3izm9LvAeOFixiIUUqmd5flZIxH92+NxL7jeu35aObQ=";
30     })
31   ];
33   propagatedBuildInputs = [
34     six
35     setuptools
36   ];
38   nativeCheckInputs = [
39     pytestCheckHook
40     httpbin
41     requests
42     wsgiprox
43     multidict # Optional. Without this, one test in test/test_utils.py is skipped.
44   ];
46   pytestFlagsArray = [ "--offline" ];
48   pythonImportsCheck = [ "warcio" ];
50   meta = with lib; {
51     description = "Streaming WARC/ARC library for fast web archive IO";
52     homepage = "https://github.com/webrecorder/warcio";
53     license = licenses.asl20;
54     maintainers = with maintainers; [ Luflosi ];
55   };