2021-10-14 00:43:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, boost
|
2022-04-15 01:41:22 +00:00
|
|
|
, catch2
|
2021-10-14 00:43:12 +00:00
|
|
|
, clasp
|
|
|
|
, cmake
|
|
|
|
, gringo
|
|
|
|
, re2c
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "1.9.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "aspcud";
|
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "potassco";
|
|
|
|
repo = "aspcud";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-d04GPMoz6PMGq6iiul0zT1C9Mljdl9uJJ2C8MIwcmaw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
cp ${catch2}/include/catch2/catch.hpp libcudf/tests/catch.hpp
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ boost clasp gringo re2c ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_BUILD_TYPE=Release"
|
|
|
|
"-DASPCUD_GRINGO_PATH=${gringo}/bin/gringo"
|
|
|
|
"-DASPCUD_CLASP_PATH=${clasp}/bin/clasp"
|
|
|
|
];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Solver for package problems in CUDF format using ASP";
|
|
|
|
homepage = "https://potassco.org/aspcud/";
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.hakuch ];
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
};
|
|
|
|
}
|