2022-09-07 20:11:03 +00:00
|
|
|
{ lib, stdenv, buildPackages, fetchurl, tcl, makeWrapper, autoreconfHook, fetchpatch, substituteAll }:
|
2008-02-27 15:48:53 +00:00
|
|
|
|
2021-04-30 22:59:45 +00:00
|
|
|
tcl.mkTclDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "expect";
|
2021-02-12 03:23:10 +00:00
|
|
|
version = "5.45.4";
|
2012-01-18 20:51:52 +00:00
|
|
|
|
2008-02-27 15:48:53 +00:00
|
|
|
src = fetchurl {
|
2013-09-03 21:57:51 +00:00
|
|
|
url = "mirror://sourceforge/expect/Expect/${version}/expect${version}.tar.gz";
|
2018-02-26 05:00:08 +00:00
|
|
|
sha256 = "0d1cp5hggjl93xwc8h1y6adbnrvpkk0ywkd00inz9ndxn21xm9s9";
|
2008-02-27 15:48:53 +00:00
|
|
|
};
|
|
|
|
|
2021-03-04 19:35:28 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2021-03-04 19:35:28 +00:00
|
|
|
url = "https://raw.githubusercontent.com/buildroot/buildroot/c05e6aa361a4049eabd8b21eb64a34899ef83fc7/package/expect/0001-enable-cross-compilation.patch";
|
2021-03-04 19:35:28 +00:00
|
|
|
sha256 = "1jwx2l1slidvcpahxbyqs942l81jd62rzbxliyd9lwysk38c8b6b";
|
|
|
|
})
|
2022-09-07 20:11:03 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-cross-compilation.patch;
|
|
|
|
tcl = "${buildPackages.tcl}/bin/tclsh";
|
|
|
|
})
|
2021-03-04 19:35:28 +00:00
|
|
|
];
|
2015-12-23 01:59:47 +00:00
|
|
|
|
2020-02-16 23:54:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "s,/bin/stty,$(type -p stty),g" configure.in
|
2008-04-04 18:24:41 +00:00
|
|
|
'';
|
2012-01-18 20:51:52 +00:00
|
|
|
|
2021-04-30 22:59:45 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook makeWrapper ];
|
2021-03-04 19:35:28 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2021-06-17 18:40:12 +00:00
|
|
|
postInstall = ''
|
|
|
|
tclWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ tcl ]})
|
|
|
|
${lib.optionalString stdenv.isDarwin "tclWrapperArgs+=(--prefix DYLD_LIBRARY_PATH : $out/lib/expect${version})"}
|
2015-01-07 03:05:46 +00:00
|
|
|
'';
|
2008-02-27 15:48:53 +00:00
|
|
|
|
2021-02-14 08:17:09 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2008-02-27 15:48:53 +00:00
|
|
|
description = "A tool for automating interactive applications";
|
2023-01-21 21:41:12 +00:00
|
|
|
homepage = "https://expect.sourceforge.net/";
|
2021-02-12 03:23:10 +00:00
|
|
|
license = licenses.publicDomain;
|
2015-08-29 19:20:20 +00:00
|
|
|
platforms = platforms.unix;
|
2021-02-12 03:23:10 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2008-02-27 15:48:53 +00:00
|
|
|
};
|
|
|
|
}
|