summary refs log tree commit diff
path: root/pkgs/tools/misc/gringo/default.nix
diff options
context:
space:
mode:
authorJesse Haber-Kucharsky <hakuch@users.noreply.github.com>2016-09-12 04:44:50 -0400
committervbgl <vbgl@users.noreply.github.com>2016-09-12 10:44:50 +0200
commit99e06fe771c76b88c3bd0b179297da906867b7d1 (patch)
tree906bcef54612f7b7719dd1aa2e2423725a5923af /pkgs/tools/misc/gringo/default.nix
parent8d8f57d4aa8bf0aa3b7301a751b5240646981e42 (diff)
downloadnixpkgs-99e06fe771c76b88c3bd0b179297da906867b7d1.tar
nixpkgs-99e06fe771c76b88c3bd0b179297da906867b7d1.tar.gz
nixpkgs-99e06fe771c76b88c3bd0b179297da906867b7d1.tar.bz2
nixpkgs-99e06fe771c76b88c3bd0b179297da906867b7d1.tar.lz
nixpkgs-99e06fe771c76b88c3bd0b179297da906867b7d1.tar.xz
nixpkgs-99e06fe771c76b88c3bd0b179297da906867b7d1.tar.zst
nixpkgs-99e06fe771c76b88c3bd0b179297da906867b7d1.zip
opam, aspcud: init packages for external solver (#16938)
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.
Diffstat (limited to 'pkgs/tools/misc/gringo/default.nix')
-rw-r--r--pkgs/tools/misc/gringo/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/tools/misc/gringo/default.nix b/pkgs/tools/misc/gringo/default.nix
new file mode 100644
index 00000000000..ae71c01314c
--- /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;
+  };
+}