2018-08-20 11:43:41 -07:00
|
|
|
{ stdenv, lib, fetchurl, autoconf, automake, pkgconfig, libtool
|
2018-08-07 07:24:48 -07:00
|
|
|
, gtk2, halibut, ncurses, perl
|
2018-08-20 11:43:41 -07:00
|
|
|
}:
|
2015-03-17 06:40:29 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-03-18 10:24:45 -07:00
|
|
|
version = "0.71";
|
2015-03-17 06:40:29 -07:00
|
|
|
name = "putty-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2017-10-21 09:15:47 -07:00
|
|
|
urls = [
|
|
|
|
"https://the.earth.li/~sgtatham/putty/${version}/${name}.tar.gz"
|
|
|
|
"ftp://ftp.wayne.edu/putty/putty-website-mirror/${version}/${name}.tar.gz"
|
|
|
|
];
|
2019-03-18 10:24:45 -07:00
|
|
|
sha256 = "1f66iss0kqk982azmxbk4xfm2i1csby91vdvly6cr04pz3i1r4rg";
|
2015-03-17 06:40:29 -07:00
|
|
|
};
|
2010-05-07 07:18:00 -07:00
|
|
|
|
2018-08-20 11:43:41 -07:00
|
|
|
preConfigure = lib.optionalString stdenv.hostPlatform.isUnix ''
|
2010-05-07 07:18:00 -07:00
|
|
|
perl mkfiles.pl
|
|
|
|
( cd doc ; make );
|
2015-07-26 16:52:24 -07:00
|
|
|
sed -e '/AM_PATH_GTK(/d' \
|
|
|
|
-e '/AC_OUTPUT/iAM_PROG_CC_C_O' \
|
|
|
|
-e '/AC_OUTPUT/iAM_PROG_AR' -i configure.ac
|
2012-10-30 01:49:43 -07:00
|
|
|
./mkauto.sh
|
2010-05-07 07:18:00 -07:00
|
|
|
cd unix
|
2018-08-20 11:43:41 -07:00
|
|
|
'' + lib.optionalString stdenv.hostPlatform.isWindows ''
|
2018-08-07 07:24:48 -07:00
|
|
|
cd windows
|
2010-05-07 07:18:00 -07:00
|
|
|
'';
|
2007-05-28 07:14:12 -07:00
|
|
|
|
2018-08-07 07:24:48 -07:00
|
|
|
TOOLPATH = stdenv.cc.targetPrefix;
|
2018-08-20 11:43:41 -07:00
|
|
|
makefile = if stdenv.hostPlatform.isWindows then "Makefile.mgw" else null;
|
2018-08-07 07:24:48 -07:00
|
|
|
|
2018-08-20 11:43:41 -07:00
|
|
|
installPhase = if stdenv.hostPlatform.isWindows then ''
|
2018-08-07 07:24:48 -07:00
|
|
|
for exe in *.exe; do
|
|
|
|
install -D $exe $out/bin/$exe
|
|
|
|
done
|
|
|
|
'' else null;
|
|
|
|
|
2017-10-21 09:15:47 -07:00
|
|
|
nativeBuildInputs = [ autoconf automake halibut libtool perl pkgconfig ];
|
2018-08-20 11:43:41 -07:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isUnix [
|
|
|
|
gtk2 ncurses
|
|
|
|
];
|
2017-10-21 09:15:47 -07:00
|
|
|
enableParallelBuilding = true;
|
2015-03-17 06:40:29 -07:00
|
|
|
|
2018-08-07 07:24:48 -07:00
|
|
|
meta = with lib; {
|
2015-03-17 06:40:29 -07:00
|
|
|
description = "A Free Telnet/SSH Client";
|
|
|
|
longDescription = ''
|
|
|
|
PuTTY is a free implementation of Telnet and SSH for Windows and Unix
|
|
|
|
platforms, along with an xterm terminal emulator.
|
|
|
|
It is written and maintained primarily by Simon Tatham.
|
|
|
|
'';
|
2017-08-22 11:50:04 -07:00
|
|
|
homepage = https://www.chiark.greenend.org.uk/~sgtatham/putty/;
|
2015-03-17 06:40:29 -07:00
|
|
|
license = licenses.mit;
|
2018-08-07 07:24:48 -07:00
|
|
|
platforms = platforms.unix ++ platforms.windows;
|
2015-03-17 06:40:29 -07:00
|
|
|
};
|
2007-05-28 07:14:12 -07:00
|
|
|
}
|