Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl }: 2 3stdenv.mkDerivation rec { 4 pname = "gprolog"; 5 version = "1.5.0"; 6 7 src = fetchurl { 8 urls = [ 9 "mirror://gnu/gprolog/gprolog-${version}.tar.gz" 10 "http://www.gprolog.org/gprolog-${version}.tar.gz" 11 ]; 12 sha256 = "sha256-ZwZCtDwPqifr1olh77F+vnB2iPkbaAlWbd1gYTlRLAE="; 13 }; 14 15 hardeningDisable = lib.optional stdenv.isi686 "pic"; 16 17 patchPhase = '' 18 sed -i -e "s|/tmp/make.log|$TMPDIR/make.log|g" src/Pl2Wam/check_boot 19 ''; 20 21 preConfigure = '' 22 cd src 23 configureFlagsArray=( 24 "--with-install-dir=$out" 25 "--without-links-dir" 26 "--with-examples-dir=$out/share/gprolog-${version}/examples" 27 "--with-doc-dir=$out/share/gprolog-${version}/doc" 28 ) 29 ''; 30 31 postInstall = '' 32 mv -v $out/[A-Z]* $out/gprolog.ico $out/share/gprolog-${version}/ 33 ''; 34 35 doCheck = true; 36 37 meta = { 38 homepage = "https://www.gnu.org/software/gprolog/"; 39 description = "GNU Prolog, a free Prolog compiler with constraint solving over finite domains"; 40 license = lib.licenses.lgpl3Plus; 41 42 longDescription = '' 43 GNU Prolog is a free Prolog compiler with constraint solving 44 over finite domains developed by Daniel Diaz. 45 46 GNU Prolog accepts Prolog+constraint programs and produces 47 native binaries (like gcc does from a C source). The obtained 48 executable is then stand-alone. The size of this executable can 49 be quite small since GNU Prolog can avoid to link the code of 50 most unused built-in predicates. The performances of GNU Prolog 51 are very encouraging (comparable to commercial systems). 52 53 Beside the native-code compilation, GNU Prolog offers a 54 classical interactive interpreter (top-level) with a debugger. 55 56 The Prolog part conforms to the ISO standard for Prolog with 57 many extensions very useful in practice (global variables, OS 58 interface, sockets,...). 59 60 GNU Prolog also includes an efficient constraint solver over 61 Finite Domains (FD). This opens contraint logic programming to 62 the user combining the power of constraint programming to the 63 declarativity of logic programming. 64 ''; 65 66 platforms = lib.platforms.unix; 67 }; 68}