diff options
-rw-r--r-- | lib/maintainers.nix | 1 | ||||
-rw-r--r-- | pkgs/development/tools/ocaml/opam/default.nix | 14 | ||||
-rw-r--r-- | pkgs/tools/misc/aspcud/default.nix | 44 | ||||
-rw-r--r-- | pkgs/tools/misc/clasp/default.nix | 32 | ||||
-rw-r--r-- | pkgs/tools/misc/gringo/default.nix | 39 | ||||
-rw-r--r-- | pkgs/tools/misc/gringo/gringo-4.5.4-cmath.patch | 11 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 8 |
7 files changed, 147 insertions, 2 deletions
diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 0e5740a6c325..b9bf6661671b 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -168,6 +168,7 @@ grahamc = "Graham Christensen <graham@grahamc.com>"; gridaphobe = "Eric Seidel <eric@seidel.io>"; guibert = "David Guibert <david.guibert@gmail.com>"; + hakuch = "Jesse Haber-Kucharsky <hakuch@gmail.com>"; havvy = "Ryan Scheel <ryan.havvy@gmail.com>"; hbunke = "Hendrik Bunke <bunke.hendrik@gmail.com>"; hce = "Hans-Christian Esperer <hc@hcesperer.org>"; diff --git a/pkgs/development/tools/ocaml/opam/default.nix b/pkgs/development/tools/ocaml/opam/default.nix index 0d765ec93bbb..afa480296f6f 100644 --- a/pkgs/development/tools/ocaml/opam/default.nix +++ b/pkgs/development/tools/ocaml/opam/default.nix @@ -1,4 +1,7 @@ -{ stdenv, fetchgit, fetchurl, ocaml, unzip, ncurses, curl }: +{ stdenv, fetchgit, fetchurl, makeWrapper, + ocaml, unzip, ncurses, curl, + aspcudSupport ? !stdenv.isDarwin, aspcud +}: assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12.1"; @@ -45,7 +48,7 @@ in stdenv.mkDerivation rec { name = "opam-${version}"; version = "1.2.2"; - buildInputs = [ unzip curl ncurses ocaml ]; + buildInputs = [ unzip curl ncurses ocaml makeWrapper]; src = srcs.opam; @@ -69,6 +72,13 @@ in stdenv.mkDerivation rec { # Dirty, but apparently ocp-build requires a TERM makeFlags = ["TERM=screen"]; + postInstall = + if aspcudSupport then '' + wrapProgram $out/bin/opam \ + --suffix PATH : ${aspcud}/bin + '' + else ""; + doCheck = false; meta = with stdenv.lib; { diff --git a/pkgs/tools/misc/aspcud/default.nix b/pkgs/tools/misc/aspcud/default.nix new file mode 100644 index 000000000000..577c0a33b3ee --- /dev/null +++ b/pkgs/tools/misc/aspcud/default.nix @@ -0,0 +1,44 @@ +{ 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; + }; +} diff --git a/pkgs/tools/misc/clasp/default.nix b/pkgs/tools/misc/clasp/default.nix new file mode 100644 index 000000000000..135eda554b36 --- /dev/null +++ b/pkgs/tools/misc/clasp/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl }: + +let + version = "3.1.4"; +in + +stdenv.mkDerivation { + name = "clasp-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/project/potassco/clasp/${version}/clasp-${version}-source.tar.gz"; + sha256 = "1zkjqc4gp4n9p2kf3k3z8x82g42any4p3shhhivny89z1jlxi9zn"; + }; + + preConfigure = "patchShebangs ./configure.sh"; + configureScript = "./configure.sh"; + + preBuild = "cd build/release"; + + installPhase = '' + mkdir -p $out/bin + cp bin/clasp $out/bin/clasp + ''; + + meta = with stdenv.lib; { + description = "Answer set solver for (extended) normal and disjunctive logic programs"; + homepage = http://potassco.sourceforge.net/; + platforms = platforms.all; + maintainers = [ maintainers.hakuch ]; + license = licenses.gpl2Plus; + }; +} diff --git a/pkgs/tools/misc/gringo/default.nix b/pkgs/tools/misc/gringo/default.nix new file mode 100644 index 000000000000..ae71c01314cf --- /dev/null +++ b/pkgs/tools/misc/gringo/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, + bison, re2c, scons +}: + +let + version = "4.5.4"; +in + +stdenv.mkDerivation rec { + name = "gringo-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/project/potassco/gringo/${version}/gringo-${version}-source.tar.gz"; + sha256 = "16k4pkwyr2mh5w8j91vhxh9aff7f4y31npwf09w6f8q63fxvpy41"; + }; + + buildInputs = [ bison re2c scons ]; + + patches = [ + ./gringo-4.5.4-cmath.patch + ]; + + buildPhase = '' + scons --build-dir=release + ''; + + installPhase = '' + mkdir -p $out/bin + cp build/release/gringo $out/bin/gringo + ''; + + meta = with stdenv.lib; { + description = "Converts input programs with first-order variables to equivalent ground programs"; + homepage = http://potassco.sourceforge.net/; + platforms = platforms.linux; + maintainers = [ maintainers.hakuch ]; + license = licenses.gpl3Plus; + }; +} diff --git a/pkgs/tools/misc/gringo/gringo-4.5.4-cmath.patch b/pkgs/tools/misc/gringo/gringo-4.5.4-cmath.patch new file mode 100644 index 000000000000..7b5510e2344b --- /dev/null +++ b/pkgs/tools/misc/gringo/gringo-4.5.4-cmath.patch @@ -0,0 +1,11 @@ +--- gringo/libgringo/src/term.cc~ 2016-07-12 23:56:10.593577749 -0400 ++++ gringo/libgringo/src/term.cc 2016-07-12 23:52:35.169968338 -0400 +@@ -22,6 +22,8 @@ + #include "gringo/logger.hh" + #include "gringo/graph.hh" + ++#include <cmath> ++ + namespace Gringo { + + // {{{ definition of Defines diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9262c8c144a4..a70e553b2d7f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -536,6 +536,10 @@ in }; aria = self.aria2; + aspcud = callPackage ../tools/misc/aspcud { + boost = boost155; + }; + at = callPackage ../tools/system/at { }; atftp = callPackage ../tools/networking/atftp { }; @@ -710,6 +714,8 @@ in ckbcomp = callPackage ../tools/X11/ckbcomp { }; + clasp = callPackage ../tools/misc/clasp { }; + cli53 = callPackage ../tools/admin/cli53 { }; cli-visualizer = callPackage ../applications/misc/cli-visualizer { }; @@ -843,6 +849,8 @@ in gmic = callPackage ../tools/graphics/gmic { }; + gringo = callPackage ../tools/misc/gringo { }; + gti = callPackage ../tools/misc/gti { }; heatseeker = callPackage ../tools/misc/heatseeker { }; |