3
0
Fork 0
forked from mirrors/nixpkgs

expect: fix Darwin linkage

expect's build system doesn't seem to provide the proper linker flags
for the expect programs to be able to find libexpect on Darwin. (Stuff
like this should really just use libtool. *sigh*). Setting
DYLD_LIBRARY_PATH is an inelegant hack, but it gets the job done
without risking affecting other platforms.
This commit is contained in:
Daniel Fox Franke 2015-08-29 15:20:20 -04:00 committed by Rok Garbas
parent 7c3d65ec41
commit 36ac761340

View file

@ -1,8 +1,7 @@
{ stdenv, fetchurl, tcl, makeWrapper }:
let version = "5.45";
in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
version = "5.45";
name = "expect-${version}";
src = fetchurl {
@ -27,7 +26,8 @@ stdenv.mkDerivation {
for i in $out/bin/*; do
wrapProgram $i \
--prefix PATH : "${tcl}/bin" \
--prefix TCLLIBPATH ' ' $out/lib/*
--prefix TCLLIBPATH ' ' $out/lib/* \
${stdenv.lib.optionalString stdenv.isDarwin "--prefix DYLD_LIBRARY_PATH : $out/lib/expect${version}"}
done
'';
@ -35,7 +35,7 @@ stdenv.mkDerivation {
description = "A tool for automating interactive applications";
homepage = http://expect.nist.gov/;
license = "Expect";
platforms = platforms.linux;
platforms = platforms.unix;
maintainers = with maintainers; [ wkennington ];
};
}