nixpkgs/pkgs/development/python-modules/frozenlist/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

51 lines
910 B
Nix

{ lib
, buildPythonPackage
, cython
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "frozenlist";
version = "1.3.3";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "aio-libs";
repo = pname;
rev = "v${version}";
hash = "sha256-lJWRdXvuzyvJwNSpv0+ojY4rwws3jwDtlLOqYyLPrZc=";
};
nativeBuildInputs = [
cython
];
nativeCheckInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace pytest.ini \
--replace "--cov=frozenlist" ""
'';
preBuild = ''
cython frozenlist/_frozenlist.pyx
'';
pythonImportsCheck = [
"frozenlist"
];
meta = with lib; {
description = "Python module for list-like structure";
homepage = "https://github.com/aio-libs/frozenlist";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}