2015-01-07 04:05:46 +01:00
|
|
|
{ stdenv, fetchurl, tcl, makeWrapper }:
|
2008-02-27 16:48:53 +01:00
|
|
|
|
2013-09-03 23:57:51 +02:00
|
|
|
let version = "5.45";
|
|
|
|
in
|
2008-02-27 16:48:53 +01:00
|
|
|
stdenv.mkDerivation {
|
2013-09-03 23:57:51 +02:00
|
|
|
name = "expect-${version}";
|
2012-01-18 21:51:52 +01:00
|
|
|
|
2008-02-27 16:48:53 +01:00
|
|
|
src = fetchurl {
|
2013-09-03 23:57:51 +02:00
|
|
|
url = "mirror://sourceforge/expect/Expect/${version}/expect${version}.tar.gz";
|
|
|
|
sha256 = "0h60bifxj876afz4im35rmnbnxjx4lbdqp2ja3k30fwa8a8cm3dj";
|
2008-02-27 16:48:53 +01:00
|
|
|
};
|
|
|
|
|
2013-09-03 23:57:51 +02:00
|
|
|
buildInputs = [ tcl ];
|
2015-01-07 04:05:46 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2008-02-27 16:48:53 +01:00
|
|
|
|
|
|
|
#NIX_CFLAGS_COMPILE = "-DHAVE_UNISTD_H";
|
|
|
|
|
|
|
|
# http://wiki.linuxfromscratch.org/lfs/ticket/2126
|
|
|
|
#preBuild = ''
|
|
|
|
# substituteInPlace exp_inter.c --replace tcl.h tclInt.h
|
|
|
|
#'';
|
|
|
|
|
2008-04-04 20:24:41 +02:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace configure --replace /bin/stty "$(type -tP stty)"
|
2009-05-10 13:31:17 +02:00
|
|
|
sed -e '1i\#include <tclInt.h>' -i exp_inter.c
|
2009-12-21 09:55:31 +01:00
|
|
|
export NIX_LDFLAGS="-rpath $out/lib $NIX_LDFLAGS"
|
2013-09-17 01:39:05 +02:00
|
|
|
'' + stdenv.lib.optionalString stdenv.isFreeBSD ''
|
|
|
|
ln -s libexpect.so.1 libexpect545.so
|
2008-04-04 20:24:41 +02:00
|
|
|
'';
|
2012-01-18 21:51:52 +01:00
|
|
|
|
2013-09-03 23:57:51 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--with-tcl=${tcl}/lib"
|
2012-01-18 21:51:52 +01:00
|
|
|
"--with-tclinclude=${tcl}/include"
|
2015-01-07 04:05:46 +01:00
|
|
|
"--exec-prefix=$(out)"
|
2013-09-03 23:57:51 +02:00
|
|
|
];
|
|
|
|
|
2015-01-07 04:05:46 +01:00
|
|
|
postInstall = ''
|
|
|
|
for i in $out/bin/*; do
|
|
|
|
wrapProgram $i \
|
|
|
|
--prefix PATH : "${tcl}/bin" \
|
|
|
|
--prefix TCLLIBPATH ' ' $out/lib/*
|
|
|
|
done
|
|
|
|
'';
|
2008-02-27 16:48:53 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A tool for automating interactive applications";
|
|
|
|
homepage = http://expect.nist.gov/;
|
|
|
|
};
|
|
|
|
}
|