2021-01-22 11:25:31 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2009-02-19 13:32:07 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-15 09:29:18 +00:00
|
|
|
pname = "gprolog";
|
|
|
|
version = "1.5.0";
|
2009-02-19 13:32:07 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
urls = [
|
2021-08-15 09:29:18 +00:00
|
|
|
"mirror://gnu/gprolog/gprolog-${version}.tar.gz"
|
|
|
|
"http://www.gprolog.org/gprolog-${version}.tar.gz"
|
2009-02-19 13:32:07 +00:00
|
|
|
];
|
2021-07-09 23:00:52 +00:00
|
|
|
sha256 = "sha256-ZwZCtDwPqifr1olh77F+vnB2iPkbaAlWbd1gYTlRLAE=";
|
2009-02-19 13:32:07 +00:00
|
|
|
};
|
|
|
|
|
2021-01-22 11:25:31 +00:00
|
|
|
hardeningDisable = lib.optional stdenv.isi686 "pic";
|
2016-04-05 16:44:02 +00:00
|
|
|
|
2014-01-21 19:07:26 +00:00
|
|
|
patchPhase = ''
|
|
|
|
sed -i -e "s|/tmp/make.log|$TMPDIR/make.log|g" src/Pl2Wam/check_boot
|
|
|
|
'';
|
|
|
|
|
2013-08-27 11:03:37 +00:00
|
|
|
preConfigure = ''
|
|
|
|
cd src
|
|
|
|
configureFlagsArray=(
|
|
|
|
"--with-install-dir=$out"
|
|
|
|
"--without-links-dir"
|
2021-08-15 09:29:18 +00:00
|
|
|
"--with-examples-dir=$out/share/gprolog-${version}/examples"
|
|
|
|
"--with-doc-dir=$out/share/gprolog-${version}/doc"
|
2013-08-27 11:03:37 +00:00
|
|
|
)
|
|
|
|
'';
|
2009-02-19 13:32:07 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2021-08-15 09:29:18 +00:00
|
|
|
mv -v $out/[A-Z]* $out/gprolog.ico $out/share/gprolog-${version}/
|
2009-02-19 13:32:07 +00:00
|
|
|
'';
|
|
|
|
|
2012-10-24 16:28:36 +00:00
|
|
|
doCheck = true;
|
2009-02-19 13:32:07 +00:00
|
|
|
|
2012-10-24 16:28:36 +00:00
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.gnu.org/software/gprolog/";
|
2009-02-19 13:32:07 +00:00
|
|
|
description = "GNU Prolog, a free Prolog compiler with constraint solving over finite domains";
|
2021-01-22 11:25:31 +00:00
|
|
|
license = lib.licenses.lgpl3Plus;
|
2009-02-19 13:32:07 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
|
2021-03-03 11:45:09 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2009-02-19 13:32:07 +00:00
|
|
|
};
|
|
|
|
}
|