1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, requests
5, tqdm
6, nose
7, vcrpy
8, pytestCheckHook
9, pythonOlder
10}:
11
12buildPythonPackage rec {
13 pname = "habanero";
14 version = "1.2.2";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "sckott";
21 repo = pname;
22 rev = "refs/tags/v${version}";
23 hash = "sha256-i6tgMEiaDcaBR8XfGvEMXQfTaDp1RJRosj/EfF1dQU4=";
24 };
25
26 propagatedBuildInputs = [
27 requests
28 tqdm
29 ];
30
31 checkInputs = [
32 pytestCheckHook
33 vcrpy
34 ];
35
36 pythonImportsCheck = [
37 "habanero"
38 ];
39
40 # almost the entirety of the test suite makes network calls
41 pytestFlagsArray = [
42 "test/test-filters.py"
43 ];
44
45 meta = with lib; {
46 description = "Python interface to Library Genesis";
47 homepage = "https://habanero.readthedocs.io/";
48 license = licenses.mit;
49 maintainers = with maintainers; [ nico202 ];
50 };
51}