3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/misc/aspcud/default.nix

45 lines
1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl,
boost, clasp, cmake, gringo, re2c
}:
let
2017-02-16 12:55:25 +00:00
version = "1.9.1";
in
stdenv.mkDerivation rec {
name = "aspcud-${version}";
src = fetchurl {
url = "mirror://sourceforge/project/potassco/aspcud/${version}/aspcud-${version}-source.tar.gz";
2017-02-16 12:55:25 +00:00
sha256 = "09sqbshwrqz2fvlkz73mns5i3m70fh8mvwhz8450izy5lsligsg0";
};
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.all;
maintainers = [ maintainers.hakuch ];
license = licenses.gpl3Plus;
};
}