3
0
Fork 0
forked from mirrors/nixpkgs

swiProlog: fixed for darwin

This commit is contained in:
Alex Ivanov 2016-10-13 09:36:49 +03:00
parent 82986b7369
commit e9e69993b2

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, gmp, readline, openssl, libjpeg, unixODBC, zlib
, libXinerama, libXft, libXpm, libSM, libXt, freetype, pkgconfig
, fontconfig
, fontconfig, makeWrapper ? stdenv.isDarwin
}:
let
@ -15,7 +15,8 @@ stdenv.mkDerivation {
};
buildInputs = [ gmp readline openssl libjpeg unixODBC libXinerama
libXft libXpm libSM libXt zlib freetype pkgconfig fontconfig ];
libXft libXpm libSM libXt zlib freetype pkgconfig fontconfig ]
++ stdenv.lib.optional stdenv.isDarwin makeWrapper;
hardeningDisable = [ "format" ];
@ -23,12 +24,24 @@ stdenv.mkDerivation {
buildFlags = "world";
# 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";
platforms = stdenv.lib.platforms.linux;
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.peti ];
};
}