Skip to content

Commit

Permalink
Merge pull request #175116 from NixOS/backport-175039-to-release-22.05
Browse files Browse the repository at this point in the history
[Backport release-22.05] clingcon: fix build
  • Loading branch information
risicle authored May 28, 2022
2 parents 812ec6f + 817e085 commit 95d85ef
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 95d85ef

Please sign in to comment.