2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, requests
|
|
|
|
, tqdm
|
|
|
|
, nose
|
|
|
|
, vcrpy
|
2022-02-10 20:34:41 +00:00
|
|
|
, pytestCheckHook
|
2022-03-30 09:31:56 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "habanero";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "1.2.2";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sckott";
|
|
|
|
repo = pname;
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-i6tgMEiaDcaBR8XfGvEMXQfTaDp1RJRosj/EfF1dQU4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
tqdm
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
vcrpy
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"habanero"
|
|
|
|
];
|
|
|
|
|
|
|
|
# almost the entirety of the test suite makes network calls
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"test/test-filters.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python interface to Library Genesis";
|
2022-03-30 09:31:56 +00:00
|
|
|
homepage = "https://habanero.readthedocs.io/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nico202 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|