Skip to content

Commit

Permalink
clingcon: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
azahi committed May 27, 2022
1 parent 2be2461 commit aa8447d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkgs/applications/science/logic/potassco/clingcon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ stdenv.mkDerivation rec {
sha256 = "1g2xkz9nsgqnrw3fdf5jchl16f0skj5mm32va61scc2yrchll166";
};

patches = [
./clingcon_limits.patch
];

postPatch = ''
cp ${catch2}/include/catch2/catch.hpp libclingcon/tests/catch.hpp
'';
Expand Down
24 changes: 24 additions & 0 deletions pkgs/applications/science/logic/potassco/clingcon_limits.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git i/libclingcon/clingcon/base.hh w/libclingcon/clingcon/base.hh
index 2d449fe..0b5fa17 100644
--- i/libclingcon/clingcon/base.hh
+++ w/libclingcon/clingcon/base.hh
@@ -28,6 +28,7 @@
#include <clingo.hh>
#include <optional>
#include <forward_list>
+#include <limits>

//! @file clingcon/base.hh
//! Basic data types.
diff --git i/libclingcon/clingcon/util.hh w/libclingcon/clingcon/util.hh
index df4cddd..308259e 100644
--- i/libclingcon/clingcon/util.hh
+++ w/libclingcon/clingcon/util.hh
@@ -30,6 +30,7 @@
#include <map>
#include <cstdlib>
#include <stdexcept>
+#include <limits>

//! @file clingcon/util.hh
//! Very general utility functions.

0 comments on commit aa8447d

Please sign in to comment.