From 853037bbb081a09a13e7de445b2b2621a2ce9624 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 7 Jan 2024 12:32:15 +0100 Subject: [PATCH] python311Packages.pystatgrab: init at 0.7.2 Python bindings for libstatgrab https://github.com/libstatgrab/pystatgrab --- .../python-modules/pystatgrab/default.nix | 53 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 55 insertions(+) create mode 100644 pkgs/development/python-modules/pystatgrab/default.nix diff --git a/pkgs/development/python-modules/pystatgrab/default.nix b/pkgs/development/python-modules/pystatgrab/default.nix new file mode 100644 index 000000000000..9ba3fb7b3785 --- /dev/null +++ b/pkgs/development/python-modules/pystatgrab/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, cython +, fetchFromGitHub +, libstatgrab +, pkg-config +, pythonOlder +, setuptools +, unittestCheckHook +, wheel +}: + +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="; + }; + + nativeBuildInputs = [ + cython + pkg-config + setuptools + wheel + ]; + + buildInputs = [ + libstatgrab + ]; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ef66c1202c3f..1844e68f7364 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11301,6 +11301,8 @@ self: super: with self; { pystardict = callPackage ../development/python-modules/pystardict { }; + pystatgrab = callPackage ../development/python-modules/pystatgrab { }; + pystemd = callPackage ../development/python-modules/pystemd { inherit (pkgs) systemd; };