mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 08:01:14 +00:00
51b04c1bf5
- Reverts the change to the monolithic `clingo` package in favor of the previous split between `clasp` and `gringo` since `opam` works with the latter but not (for some reason) with the former. - Adds explicit non-support for Python in `gringo`. This is not necessary for opam. - Forces usage of the `std::to_string` functions in the C++ standard library instead of the incomplete alternative implementations inside of the `gringo` sources.
45 lines
1 KiB
Nix
45 lines
1 KiB
Nix
{ stdenv, fetchurl,
|
|
boost, clasp, cmake, gringo, re2c
|
|
}:
|
|
|
|
let
|
|
version = "1.9.0";
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "aspcud-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/project/potassco/aspcud/${version}/aspcud-${version}-source.tar.gz";
|
|
sha256 = "029035vcdk527ssf126i8ipi5zs73gqpbrg019pvm9r24rf0m373";
|
|
};
|
|
|
|
buildInputs = [ boost clasp cmake gringo re2c ];
|
|
|
|
buildPhase = ''
|
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
|
-DGRINGO_LOC=${gringo}/bin/gringo \
|
|
-DCLASP_LOC=${clasp}/bin/clasp \
|
|
-DENCODING_LOC=$out/share/aspcud/specification.lp \
|
|
.
|
|
|
|
make
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp bin/{aspcud,cudf2lp,lemon} $out/bin
|
|
|
|
mkdir -p $out/share/aspcud
|
|
cp ../share/aspcud/specification.lp $out/share/aspcud
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Solver for package problems in CUDF format using ASP";
|
|
homepage = http://potasssco.sourceforge.net/;
|
|
platforms = platforms.linux;
|
|
maintainers = [ maintainers.hakuch ];
|
|
license = licenses.gpl3Plus;
|
|
};
|
|
}
|