diff options
Diffstat (limited to 'pkgs/tools/misc/clingo/default.nix')
-rw-r--r-- | pkgs/tools/misc/clingo/default.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/tools/misc/clingo/default.nix b/pkgs/tools/misc/clingo/default.nix new file mode 100644 index 000000000000..6ab0a68920f7 --- /dev/null +++ b/pkgs/tools/misc/clingo/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchFromGitHub, + bison, re2c, scons +}: + +let + version = "5.1.0"; +in + +stdenv.mkDerivation rec { + name = "clingo-${version}"; + + src = fetchFromGitHub { + owner = "potassco"; + repo = "clingo"; + rev = "v${version}"; + sha256 = "1rvaqqa8xfagsqxk45lax3l29sksijd3zvl662vpvdi1sy0d71xv"; + }; + + buildInputs = [ bison re2c scons ]; + + buildPhase = '' + scons --build-dir=release + ''; + + installPhase = '' + mkdir -p $out/bin + cp build/release/{gringo,clingo,reify,lpconvert} $out/bin/ + ''; + + meta = with stdenv.lib; { + description = "A grounder and solver for logic programs."; + homepage = http://potassco.org; + platforms = platforms.linux; + maintainers = [ maintainers.hakuch ]; + license = licenses.gpl3Plus; + }; +} |