2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-03-15 16:39:30 +00:00
|
|
|
, setuptools-scm
|
2022-03-30 09:31:56 +00:00
|
|
|
, 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";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "1.2.3";
|
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}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-IQp85Cigs0in3X07a9d45nMC3X2tAkPzl5hFVhfr00o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|