2021-03-09 03:18:52 +00:00
|
|
|
{ lib, stdenv, buildPackages, fetchurl, tcl, makeWrapper, autoreconfHook, fetchpatch }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
tcl.mkTclDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "expect";
|
2021-02-13 14:23:35 +00:00
|
|
|
version = "5.45.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/expect/Expect/${version}/expect${version}.tar.gz";
|
|
|
|
sha256 = "0d1cp5hggjl93xwc8h1y6adbnrvpkk0ywkd00inz9ndxn21xm9s9";
|
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/buildroot/buildroot/c05e6aa361a4049eabd8b21eb64a34899ef83fc7/package/expect/0001-enable-cross-compilation.patch";
|
|
|
|
sha256 = "1jwx2l1slidvcpahxbyqs942l81jd62rzbxliyd9lwysk38c8b6b";
|
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s,/bin/stty,$(type -p stty),g" configure.in
|
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook makeWrapper ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
postInstall = ''
|
|
|
|
tclWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ tcl ]})
|
|
|
|
${lib.optionalString stdenv.isDarwin "tclWrapperArgs+=(--prefix DYLD_LIBRARY_PATH : $out/lib/expect${version})"}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A tool for automating interactive applications";
|
|
|
|
homepage = "http://expect.sourceforge.net/";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.publicDomain;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
2021-02-13 14:23:35 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|