2021-01-17 00:15:33 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
2021-12-19 01:06:50 +00:00
|
|
|
, clingo
|
2022-04-15 01:41:22 +00:00
|
|
|
, catch2
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "clingcon";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "5.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "potassco";
|
2020-11-03 02:18:15 +00:00
|
|
|
repo = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "1g2xkz9nsgqnrw3fdf5jchl16f0skj5mm32va61scc2yrchll166";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
patches = [
|
|
|
|
./clingcon_limits.patch
|
|
|
|
];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
cp ${catch2}/include/catch2/catch.hpp libclingcon/tests/catch.hpp
|
|
|
|
'';
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
nativeBuildInputs = [ cmake clingo ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCLINGCON_MANAGE_RPATH=ON"
|
2021-12-19 01:06:50 +00:00
|
|
|
"-DPYCLINGCON_ENABLE=OFF"
|
|
|
|
"-DCLINGCON_BUILD_TESTS=ON"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "Extension of clingo to handle constraints over integers";
|
2021-12-19 01:06:50 +00:00
|
|
|
license = lib.licenses.mit;
|
2021-01-17 00:15:33 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://potassco.org/";
|
|
|
|
downloadPage = "https://github.com/potassco/clingcon/releases/";
|
|
|
|
changelog = "https://github.com/potassco/clingcon/releases/tag/v${version}";
|
|
|
|
};
|
|
|
|
}
|