1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-17 02:14:36 +00:00
nixpkgs/pkgs/development/compilers/swi-prolog/default.nix

53 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, jdk, gmp, readline, openssl, libjpeg, unixODBC, zlib
, libXinerama, libarchive, db, pcre, libedit, libossp_uuid, libXft, libXpm
, libSM, libXt, freetype, pkgconfig, fontconfig, makeWrapper ? stdenv.isDarwin
2014-01-13 16:10:11 +00:00
}:
let
2018-03-14 05:46:39 +00:00
version = "7.6.4";
in
stdenv.mkDerivation {
name = "swi-prolog-${version}";
src = fetchurl {
2016-09-15 05:31:23 +01:00
url = "http://www.swi-prolog.org/download/stable/src/swipl-${version}.tar.gz";
2018-03-14 05:46:39 +00:00
sha256 = "14bq4sqs61maqpnmgy6687jjj0shwc27cpfsqbf056nrssmplg9d";
};
buildInputs = [ jdk gmp readline openssl libjpeg unixODBC libXinerama
libarchive db pcre libedit libossp_uuid libXft libXpm libSM libXt
zlib freetype pkgconfig fontconfig ]
2016-10-13 07:36:49 +01:00
++ stdenv.lib.optional stdenv.isDarwin makeWrapper;
2014-01-13 16:10:11 +00:00
hardeningDisable = [ "format" ];
2016-02-24 17:10:58 +00:00
2018-07-25 22:44:21 +01:00
configureFlags = [
"--with-world"
"--enable-gmp"
"--enable-shared"
];
2014-01-13 16:10:11 +00:00
buildFlags = "world";
2016-10-13 07:36:49 +01:00
# For macOS: still not fixed in upstream: "abort trap 6" when called
# through symlink, so wrap binary.
# We reinvent wrapProgram here but omit argv0 pass in order to not
# break PAKCS package build. This is also safe for SWI-Prolog, since
# there is no wrapping environment and hence no need to spoof $0
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
local prog="$out/bin/swipl"
local hidden="$(dirname "$prog")/.$(basename "$prog")"-wrapped
mv $prog $hidden
makeWrapper $hidden $prog
'';
meta = {
homepage = http://www.swi-prolog.org/;
description = "A Prolog compiler and interpreter";
license = "LGPL";
2016-10-13 07:36:49 +01:00
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.meditans ];
};
}