python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / misc / expect / default.nix
blob45f45e89e82d432f95d777656c5356cc65110ab6
1 { lib, stdenv, buildPackages, fetchurl, tcl, makeWrapper, autoreconfHook, fetchpatch, substituteAll }:
3 tcl.mkTclDerivation rec {
4   pname = "expect";
5   version = "5.45.4";
7   src = fetchurl {
8     url = "mirror://sourceforge/expect/Expect/${version}/expect${version}.tar.gz";
9     sha256 = "0d1cp5hggjl93xwc8h1y6adbnrvpkk0ywkd00inz9ndxn21xm9s9";
10   };
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     (substituteAll {
18       src = ./fix-cross-compilation.patch;
19       tcl = "${buildPackages.tcl}/bin/tclsh";
20     })
21   ];
23   postPatch = ''
24     sed -i "s,/bin/stty,$(type -p stty),g" configure.in
25   '';
27   nativeBuildInputs = [ autoreconfHook makeWrapper ];
29   strictDeps = true;
30   hardeningDisable = [ "format" ];
32   postInstall = ''
33     tclWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ tcl ]})
34     ${lib.optionalString stdenv.isDarwin "tclWrapperArgs+=(--prefix DYLD_LIBRARY_PATH : $out/lib/expect${version})"}
35   '';
37   outputs = [ "out" "dev" ];
39   meta = with lib; {
40     description = "A tool for automating interactive applications";
41     homepage = "http://expect.sourceforge.net/";
42     license = licenses.publicDomain;
43     platforms = platforms.unix;
44     maintainers = with maintainers; [ SuperSandro2000 ];
45   };