git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #139766 from Luflosi/add-warcio
commitae79b7bf4015a6b06c4b0687813330f783f3546f authorSandro <sandro.jaeckel@gmail.com> dateFri 28 Jan 2022, 11:58 (5 years ago) parent36bea6fddab641
2 files changed+58
pkgs/development/python-modules/warcio/default.nix+56 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/warcio/default.nixnew file+56
@@ -0,0 +1,56 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, fetchpatch
5+, six
6+, setuptools
7+, pytestCheckHook
8+, httpbin
9+, requests
10+, wsgiprox
11+, multidict
12+}:
13+
14+buildPythonPackage rec {
15+ pname = "warcio";
16+ version = "1.7.4";
17+
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+ sha256 = "sha256-wn2rd73wRfOqHu9H0GIn76tmEsERBBCQatnk4b/JToU=";
23+ };
24+
25+ patches = [
26+ (fetchpatch {
27+ name = "add-offline-option.patch";
28+ url = "https://github.com/webrecorder/warcio/pull/135/commits/2546fe457c57ab0b391764a4ce419656458d9d07.patch";
29+ sha256 = "sha256-3izm9LvAeOFixiIUUqmd5flZIxH92+NxL7jeu35aObQ=";
30+ })
31+ ];
32+
33+ propagatedBuildInputs = [
34+ six
35+ setuptools
36+ ];
37+
38+ checkInputs = [
39+ pytestCheckHook
40+ httpbin
41+ requests
42+ wsgiprox
43+ multidict # Optional. Without this, one test in test/test_utils.py is skipped.
44+ ];
45+
46+ pytestFlagsArray = [ "--offline" ];
47+
48+ pythonImportsCheck = [ "warcio" ];
49+
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+ };
56+}
pkgs/top-level/python-packages.nix+2
@@ -10308,6 +10308,8 @@ in {
1030810308
1030910309 wandb = callPackage ../development/python-modules/wandb { };
1031010310
10311+ warcio = callPackage ../development/python-modules/warcio { };
10312+
1031110313 warlock = callPackage ../development/python-modules/warlock { };
1031210314
1031310315 warrant = callPackage ../development/python-modules/warrant { };