about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/gprolog
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/gprolog')
-rw-r--r--nixpkgs/pkgs/development/compilers/gprolog/default.nix68
1 files changed, 68 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/compilers/gprolog/default.nix b/nixpkgs/pkgs/development/compilers/gprolog/default.nix
new file mode 100644
index 000000000000..b21f0196d4b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gprolog/default.nix
@@ -0,0 +1,68 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "gprolog-1.5.0";
+
+  src = fetchurl {
+    urls = [
+      "mirror://gnu/gprolog/${name}.tar.gz"
+      "http://www.gprolog.org/${name}.tar.gz"
+    ];
+    sha256 = "sha256-ZwZCtDwPqifr1olh77F+vnB2iPkbaAlWbd1gYTlRLAE=";
+  };
+
+  hardeningDisable = lib.optional stdenv.isi686 "pic";
+
+  patchPhase = ''
+    sed -i -e "s|/tmp/make.log|$TMPDIR/make.log|g" src/Pl2Wam/check_boot
+  '';
+
+  preConfigure = ''
+    cd src
+    configureFlagsArray=(
+      "--with-install-dir=$out"
+      "--without-links-dir"
+      "--with-examples-dir=$out/share/${name}/examples"
+      "--with-doc-dir=$out/share/${name}/doc"
+    )
+  '';
+
+  postInstall = ''
+    mv -v $out/[A-Z]* $out/gprolog.ico $out/share/${name}/
+  '';
+
+  doCheck = true;
+
+  meta = {
+    homepage = "https://www.gnu.org/software/gprolog/";
+    description = "GNU Prolog, a free Prolog compiler with constraint solving over finite domains";
+    license = lib.licenses.lgpl3Plus;
+
+    longDescription = ''
+      GNU Prolog is a free Prolog compiler with constraint solving
+      over finite domains developed by Daniel Diaz.
+
+      GNU Prolog accepts Prolog+constraint programs and produces
+      native binaries (like gcc does from a C source).  The obtained
+      executable is then stand-alone.  The size of this executable can
+      be quite small since GNU Prolog can avoid to link the code of
+      most unused built-in predicates.  The performances of GNU Prolog
+      are very encouraging (comparable to commercial systems).
+
+      Beside the native-code compilation, GNU Prolog offers a
+      classical interactive interpreter (top-level) with a debugger.
+
+      The Prolog part conforms to the ISO standard for Prolog with
+      many extensions very useful in practice (global variables, OS
+      interface, sockets,...).
+
+      GNU Prolog also includes an efficient constraint solver over
+      Finite Domains (FD).  This opens contraint logic programming to
+      the user combining the power of constraint programming to the
+      declarativity of logic programming.
+    '';
+
+    maintainers = [ lib.maintainers.peti ];
+    platforms = lib.platforms.unix;
+  };
+}