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";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "5.2.1";
|
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}";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-R2kgcw8VUwhOdvPXnsahT5gnoUd5DXLqfdH++8rFoAA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "clingcon";
|
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}";
|
|
|
|
};
|
|
|
|
}
|