at 22.05-pre 42 lines 1.3 kB view raw
1{ lib, stdenv, buildPackages, fetchurl, tcl, makeWrapper, autoreconfHook, fetchpatch }: 2 3tcl.mkTclDerivation rec { 4 pname = "expect"; 5 version = "5.45.4"; 6 7 src = fetchurl { 8 url = "mirror://sourceforge/expect/Expect/${version}/expect${version}.tar.gz"; 9 sha256 = "0d1cp5hggjl93xwc8h1y6adbnrvpkk0ywkd00inz9ndxn21xm9s9"; 10 }; 11 12 patches = [ 13 (fetchpatch { 14 url = "https://raw.githubusercontent.com/buildroot/buildroot/c05e6aa361a4049eabd8b21eb64a34899ef83fc7/package/expect/0001-enable-cross-compilation.patch"; 15 sha256 = "1jwx2l1slidvcpahxbyqs942l81jd62rzbxliyd9lwysk38c8b6b"; 16 }) 17 ]; 18 19 postPatch = '' 20 sed -i "s,/bin/stty,$(type -p stty),g" configure.in 21 ''; 22 23 nativeBuildInputs = [ autoreconfHook makeWrapper ]; 24 25 strictDeps = true; 26 hardeningDisable = [ "format" ]; 27 28 postInstall = '' 29 tclWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ tcl ]}) 30 ${lib.optionalString stdenv.isDarwin "tclWrapperArgs+=(--prefix DYLD_LIBRARY_PATH : $out/lib/expect${version})"} 31 ''; 32 33 outputs = [ "out" "dev" ]; 34 35 meta = with lib; { 36 description = "A tool for automating interactive applications"; 37 homepage = "http://expect.sourceforge.net/"; 38 license = licenses.publicDomain; 39 platforms = platforms.unix; 40 maintainers = with maintainers; [ SuperSandro2000 ]; 41 }; 42}