a3bb8d7922
GitOrigin-RevId: 439b1605227b8adb1357b55ce8529d541abbe9eb
46 lines
846 B
Nix
46 lines
846 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, importlib-metadata
|
|
, numpy
|
|
, pybind11
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyfma";
|
|
version = "0.1.4";
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nschloe";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "1wkcl41j2d1yflc5dl30ys1yxx68w9zn3vj8brwkm1ar9jnfmg4h";
|
|
};
|
|
format = "pyproject";
|
|
|
|
buildInputs = [
|
|
pybind11
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
numpy
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
importlib-metadata
|
|
];
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "pyfma" ];
|
|
|
|
meta = with lib; {
|
|
description = "Fused multiply-add for Python";
|
|
homepage = "https://github.com/nschloe/pyfma";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ costrouc ];
|
|
};
|
|
}
|