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.

42 lines
925 B
Nix
Raw Normal View History

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