nixpkgs/pkgs/applications/science/logic/potassco/clingcon.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
974 B
Nix
Raw Normal View History

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