expect: fix cross-compilation

Closes #114983
This commit is contained in:
Sandro Jäckel 2021-03-04 20:35:28 +01:00
parent 96ff414198
commit cda4171d11
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, tcl, makeWrapper, autoreconfHook }: { lib, stdenv, buildPackages, fetchurl, tcl, makeWrapper, autoreconfHook, fetchpatch }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "expect"; pname = "expect";
@ -9,19 +9,27 @@ stdenv.mkDerivation rec {
sha256 = "0d1cp5hggjl93xwc8h1y6adbnrvpkk0ywkd00inz9ndxn21xm9s9"; sha256 = "0d1cp5hggjl93xwc8h1y6adbnrvpkk0ywkd00inz9ndxn21xm9s9";
}; };
buildInputs = [ tcl ]; patches = [
nativeBuildInputs = [ makeWrapper autoreconfHook ]; (fetchpatch {
url = "https://raw.githubusercontent.com/buildroot/buildroot/master/package/expect/0001-enable-cross-compilation.patch";
hardeningDisable = [ "format" ]; sha256 = "1jwx2l1slidvcpahxbyqs942l81jd62rzbxliyd9lwysk38c8b6b";
})
];
postPatch = '' postPatch = ''
sed -i "s,/bin/stty,$(type -p stty),g" configure.in sed -i "s,/bin/stty,$(type -p stty),g" configure.in
''; '';
nativeBuildInputs = [ autoreconfHook makeWrapper tcl ];
buildInputs = [ tcl ];
strictDeps = true;
hardeningDisable = [ "format" ];
configureFlags = [ configureFlags = [
"--with-tcl=${tcl}/lib" "--with-tcl=${buildPackages.tcl}/lib"
"--with-tclinclude=${tcl}/include" "--with-tclinclude=${tcl}/include"
"--exec-prefix=\${out}" "--exec-prefix=${placeholder "out"}"
]; ];
postInstall = '' postInstall = ''