2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
cython,
|
|
|
|
fetchFromGitHub,
|
|
|
|
libstatgrab,
|
|
|
|
pkg-config,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
unittestCheckHook,
|
|
|
|
wheel,
|
|
|
|
darwin,
|
2024-01-13 08:15:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pystatgrab";
|
|
|
|
version = "0.7.2";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libstatgrab";
|
|
|
|
repo = "pystatgrab";
|
2024-06-05 15:53:02 +00:00
|
|
|
rev = "PYSTATGRAB_${lib.replaceStrings [ "." ] [ "_" ] version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-0FDhkIK8jy3/SFmCzrl9l4RTeIKDjO0o5UoODx6Wnfs=";
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libstatgrab
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit ]);
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "statgrab" ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for libstatgrab";
|
|
|
|
homepage = "https://github.com/libstatgrab/pystatgrab";
|
2024-06-05 15:53:02 +00:00
|
|
|
changelog = "https://github.com/libstatgrab/pystatgrab/blob/PYSTATGRAB_${
|
|
|
|
lib.replaceStrings [ "." ] [ "_" ] version
|
|
|
|
}/NEWS";
|
2024-01-13 08:15:51 +00:00
|
|
|
license = licenses.lgpl21Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|