forked from mirrors/nixpkgs
99e06fe771
The opam package manager relies on external solvers to determine package management decisions it makes related to upgrades, new installations, etc. While, strictly speaking, an external solver is optional, aspcud is highly recommended in documentation. Furthermore, even having a relatively small number of packages installed quickly causes the limits of the interal solver to be reached (before it times out). Aspcud itself depends on two programs from the same suite: gringo, and clasp. On Darwin, Boost 1.55 (and thus Gringo) do not build, so we only support Aspcud on non-Darwin platforms.
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;
|
|
};
|
|
}
|