mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-31 09:10:08 +00:00
current version of habanero has two additional dependencies, that are not listed in the nix derivation: https://github.com/sckott/habanero/blob/v2.3.0/pyproject.toml#L20-L21 However, only the packaging dependency is actually used during runtime, so we add this dependency to the nix derivation too.
54 lines
955 B
Nix
54 lines
955 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
hatchling,
|
|
httpx,
|
|
tqdm,
|
|
urllib3,
|
|
packaging,
|
|
vcrpy,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "habanero";
|
|
version = "2.3.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sckott";
|
|
repo = "habanero";
|
|
tag = "v${version}";
|
|
hash = "sha256-XI+UOm3xONBNVSlywfBhnsCA9RdpEwDQ4oQixn4UBKk=";
|
|
};
|
|
|
|
build-system = [ hatchling ];
|
|
|
|
pythonRelaxDeps = [ "urllib3" ];
|
|
|
|
dependencies = [
|
|
httpx
|
|
tqdm
|
|
urllib3
|
|
packaging
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
vcrpy
|
|
];
|
|
|
|
pythonImportsCheck = [ "habanero" ];
|
|
|
|
# almost the entirety of the test suite makes network calls
|
|
enabledTestPaths = [ "test/test-filters.py" ];
|
|
|
|
meta = {
|
|
description = "Python interface to Library Genesis";
|
|
homepage = "https://habanero.readthedocs.io/";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ nico202 ];
|
|
};
|
|
}
|