nixpkgs/pkgs/development/python-modules/pyjet/default.nix

35 lines
832 B
Nix
Raw Normal View History

2021-11-08 19:14:28 +00:00
{ lib, buildPythonPackage, pythonOlder, fetchFromGitHub, cython, pytest, importlib-resources, numpy }:
2018-09-23 21:40:29 +01:00
buildPythonPackage rec {
pname = "pyjet";
2021-10-26 06:52:46 +01:00
version = "1.8.2";
2018-09-23 21:40:29 +01:00
# tests not included in pypi tarball
src = fetchFromGitHub {
owner = "scikit-hep";
repo = pname;
rev = version;
2021-10-26 06:52:46 +01:00
sha256 = "sha256-0EI/dbanVDvILawnnK/Ce/5n/cD4Fv7VQEZfF9yPQio=";
2018-09-23 21:40:29 +01:00
};
2018-12-10 18:31:47 +00:00
nativeBuildInputs = [ cython ];
2021-11-08 19:14:28 +00:00
propagatedBuildInputs = [
numpy
] ++ lib.optionals (pythonOlder "3.9") [
importlib-resources
];
2021-10-26 06:52:46 +01:00
checkInputs = [ pytest ];
checkPhase = ''
mv pyjet _pyjet
pytest tests/
'';
2018-09-23 21:40:29 +01:00
meta = with lib; {
homepage = "https://github.com/scikit-hep/pyjet";
description = "The interface between FastJet and NumPy";
2021-10-26 06:52:46 +01:00
license = licenses.gpl2Plus;
2018-09-23 21:40:29 +01:00
maintainers = with maintainers; [ veprbl ];
};
}