depot/third_party/nixpkgs/pkgs/development/python-modules/pystatgrab/default.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

57 lines
1.2 KiB
Nix

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