summary refs log tree commit diff
path: root/pkgs/applications/science/logic/potassco/clingcon.nix
diff options
context:
space:
mode:
authormucaho <mucaho@gmail.com>2021-12-16 20:06:06 +0100
committermucaho <mucaho@gmail.com>2021-12-16 20:28:19 +0100
commit1509f463a074e682b062fe0f7caf9137de4833cd (patch)
tree103017782f18887c4e310d85619cf604aae8a925 /pkgs/applications/science/logic/potassco/clingcon.nix
parent88a81a115a2bbd4ca0e9287f7f07adf0614d6c47 (diff)
downloadnixpkgs-1509f463a074e682b062fe0f7caf9137de4833cd.tar
nixpkgs-1509f463a074e682b062fe0f7caf9137de4833cd.tar.gz
nixpkgs-1509f463a074e682b062fe0f7caf9137de4833cd.tar.bz2
nixpkgs-1509f463a074e682b062fe0f7caf9137de4833cd.tar.lz
nixpkgs-1509f463a074e682b062fe0f7caf9137de4833cd.tar.xz
nixpkgs-1509f463a074e682b062fe0f7caf9137de4833cd.tar.zst
nixpkgs-1509f463a074e682b062fe0f7caf9137de4833cd.zip
clingcon: 3.3.0 -> 5.0.0
Diffstat (limited to 'pkgs/applications/science/logic/potassco/clingcon.nix')
-rw-r--r--pkgs/applications/science/logic/potassco/clingcon.nix24
1 files changed, 9 insertions, 15 deletions
diff --git a/pkgs/applications/science/logic/potassco/clingcon.nix b/pkgs/applications/science/logic/potassco/clingcon.nix
index 0f3218b7673..1614adf4553 100644
--- a/pkgs/applications/science/logic/potassco/clingcon.nix
+++ b/pkgs/applications/science/logic/potassco/clingcon.nix
@@ -1,39 +1,33 @@
 { lib, stdenv
 , fetchFromGitHub
 , cmake
-, bison
-, re2c
+, clingo
 }:
 
 stdenv.mkDerivation rec {
   pname = "clingcon";
-  version = "3.3.0";
+  version = "5.0.0";
 
   src = fetchFromGitHub {
     owner = "potassco";
     repo = pname;
     rev = "v${version}";
-    fetchSubmodules = true;
-    sha256 = "1q7517h10jfvjdk2czq8d6y57r8kr1j1jj2k2ip2qxkpyfigk4rs";
+    sha256 = "1g2xkz9nsgqnrw3fdf5jchl16f0skj5mm32va61scc2yrchll166";
    };
 
-  # deal with clingcon through git submodules recursively importing
-  # an outdated version of libpotassco which uses deprecated <xlocale.h> header in .cpp files
-  postPatch = ''
-    find ./ -type f -exec sed -i 's/<xlocale.h>/<locale.h>/g' {} \;
-  '';
-
-  nativeBuildInputs = [ cmake bison re2c ];
+  nativeBuildInputs = [ cmake clingo ];
 
   cmakeFlags = [
     "-DCLINGCON_MANAGE_RPATH=ON"
-    "-DCLINGO_BUILD_WITH_PYTHON=OFF"
-    "-DCLINGO_BUILD_WITH_LUA=OFF"
+    "-DPYCLINGCON_ENABLE=OFF"
+    "-DCLINGCON_BUILD_TESTS=ON"
   ];
 
+  doCheck = true;
+
   meta = {
     description = "Extension of clingo to handle constraints over integers";
-    license = lib.licenses.gpl3; # for now GPL3, next version MIT!
+    license = lib.licenses.mit;
     platforms = lib.platforms.unix;
     homepage = "https://potassco.org/";
     downloadPage = "https://github.com/potassco/clingcon/releases/";