1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 httpx,
7 tqdm,
8 urllib3,
9 vcrpy,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "habanero";
15 version = "2.3.0";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "sckott";
20 repo = "habanero";
21 tag = "v${version}";
22 hash = "sha256-XI+UOm3xONBNVSlywfBhnsCA9RdpEwDQ4oQixn4UBKk=";
23 };
24
25 build-system = [ hatchling ];
26
27 pythonRelaxDeps = [ "urllib3" ];
28
29 dependencies = [
30 httpx
31 tqdm
32 urllib3
33 ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 vcrpy
38 ];
39
40 pythonImportsCheck = [ "habanero" ];
41
42 # almost the entirety of the test suite makes network calls
43 enabledTestPaths = [ "test/test-filters.py" ];
44
45 meta = {
46 description = "Python interface to Library Genesis";
47 homepage = "https://habanero.readthedocs.io/";
48 license = lib.licenses.mit;
49 maintainers = with lib.maintainers; [ nico202 ];
50 };
51}