python3Packages.clingo: init at 5.8.0

This commit is contained in:
Christoph Jabs
2025-11-05 12:24:50 +02:00
parent 8172e83ebb
commit 2144661f06
2 changed files with 29 additions and 1 deletions
+22 -1
View File
@@ -3,6 +3,8 @@
stdenv,
fetchFromGitHub,
cmake,
withPython ? false,
python ? null,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -18,7 +20,26 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DCLINGO_BUILD_WITH_PYTHON=OFF" ];
cmakeFlags =
if withPython then
[
"-DCLINGO_BUILD_WITH_PYTHON=ON"
"-DPYTHON_EXECUTABLE=${lib.getExe python.pythonOnBuildForHost}"
]
else
[ "-DCLINGO_BUILD_WITH_PYTHON=OFF" ];
propagatedBuildInputs = lib.optionals withPython (
with python.pkgs;
[
python
cffi
]
);
pythonImportsCheck = [
"clingo"
];
meta = {
description = "ASP system to ground and solve logic programs";
+7
View File
@@ -2717,6 +2717,13 @@ self: super: with self; {
clikit = callPackage ../development/python-modules/clikit { };
clingo = toPythonModule (
pkgs.clingo.override {
inherit python;
withPython = true;
}
);
clint = callPackage ../development/python-modules/clint { };
clintermission = callPackage ../development/python-modules/clintermission { };