From 202c2a8effa549eab4ca3240d2d5bab36ab00fbc Mon Sep 17 00:00:00 2001 From: mucaho Date: Fri, 21 Feb 2020 12:43:11 +0100 Subject: [PATCH] clingcon: init at 3.3.0 --- .../science/logic/potassco/clingcon.nix | 43 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/applications/science/logic/potassco/clingcon.nix diff --git a/pkgs/applications/science/logic/potassco/clingcon.nix b/pkgs/applications/science/logic/potassco/clingcon.nix new file mode 100644 index 000000000000..1203822d86e9 --- /dev/null +++ b/pkgs/applications/science/logic/potassco/clingcon.nix @@ -0,0 +1,43 @@ +{ stdenv +, fetchFromGitHub +, cmake +, bison +, re2c +}: + +stdenv.mkDerivation rec { + pname = "clingcon"; + version = "3.3.0"; + + src = fetchFromGitHub { + owner = "potassco"; + repo = "${pname}"; + rev = "v${version}"; + fetchSubmodules = true; + sha256 = "1q7517h10jfvjdk2czq8d6y57r8kr1j1jj2k2ip2qxkpyfigk4rs"; + }; + + # deal with clingcon through git submodules recursively importing + # an outdated version of libpotassco which uses deprecated header in .cpp files + postPatch = '' + find ./ -type f -exec sed -i 's///g' {} \; + ''; + + nativeBuildInputs = [ cmake bison re2c ]; + + cmakeFlags = [ + "-DCLINGCON_MANAGE_RPATH=ON" + "-DCLINGO_BUILD_WITH_PYTHON=OFF" + "-DCLINGO_BUILD_WITH_LUA=OFF" + ]; + + meta = { + inherit version; + description = "Extension of clingo to handle constraints over integers"; + license = stdenv.lib.licenses.gpl3; # for now GPL3, next version MIT! + platforms = stdenv.lib.platforms.unix; + homepage = "https://potassco.org/"; + downloadPage = "https://github.com/potassco/clingcon/releases/"; + changelog = "https://github.com/potassco/clingcon/releases/tag/v${version}"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4c8282ef729d..aad00a719d8e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1451,6 +1451,8 @@ in clingo = callPackage ../applications/science/logic/potassco/clingo.nix { }; + clingcon = callPackage ../applications/science/logic/potassco/clingcon.nix { }; + clprover = callPackage ../applications/science/logic/clprover/clprover.nix { }; coloredlogs = with python3Packages; toPythonApplication coloredlogs;