Unverified Commit 95993f19 authored by 7c6f434c's avatar 7c6f434c Committed by GitHub
Browse files

python3Packages.clingo: init at 5.8.0 (#458780)

parents ce73f084 2144661f
Loading
Loading
Loading
Loading
+22 −1
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
@@ -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 { };