2017-10-21 18:15:47 +02:00
|
|
|
{ stdenv, fetchurl, autoconf, automake, pkgconfig, libtool
|
2018-08-07 16:24:48 +02:00
|
|
|
, gtk2, halibut, ncurses, perl
|
|
|
|
, hostPlatform, lib }:
|
2015-03-17 14:40:29 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-10-21 18:15:47 +02:00
|
|
|
version = "0.70";
|
2015-03-17 14:40:29 +01:00
|
|
|
name = "putty-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2017-10-21 18:15:47 +02:00
|
|
|
urls = [
|
|
|
|
"https://the.earth.li/~sgtatham/putty/${version}/${name}.tar.gz"
|
|
|
|
"ftp://ftp.wayne.edu/putty/putty-website-mirror/${version}/${name}.tar.gz"
|
|
|
|
];
|
|
|
|
sha256 = "1gmhwwj1y7b5hgkrkxpf4jddjpk9l5832zq5ibhsiicndsfs92mv";
|
2015-03-17 14:40:29 +01:00
|
|
|
};
|
2010-05-07 16:18:00 +02:00
|
|
|
|
2018-08-07 16:24:48 +02:00
|
|
|
preConfigure = lib.optionalString hostPlatform.isUnix ''
|
2010-05-07 16:18:00 +02:00
|
|
|
perl mkfiles.pl
|
|
|
|
( cd doc ; make );
|
2015-07-27 01:52:24 +02: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 09:49:43 +01:00
|
|
|
./mkauto.sh
|
2010-05-07 16:18:00 +02:00
|
|
|
cd unix
|
2018-08-07 16:24:48 +02:00
|
|
|
'' + lib.optionalString hostPlatform.isWindows ''
|
|
|
|
cd windows
|
2010-05-07 16:18:00 +02:00
|
|
|
'';
|
2007-05-28 16:14:12 +02:00
|
|
|
|
2018-08-07 16:24:48 +02:00
|
|
|
TOOLPATH = stdenv.cc.targetPrefix;
|
|
|
|
makefile = if hostPlatform.isWindows then "Makefile.mgw" else null;
|
|
|
|
|
|
|
|
installPhase = if hostPlatform.isWindows then ''
|
|
|
|
for exe in *.exe; do
|
|
|
|
install -D $exe $out/bin/$exe
|
|
|
|
done
|
|
|
|
'' else null;
|
|
|
|
|
2017-10-21 18:15:47 +02:00
|
|
|
nativeBuildInputs = [ autoconf automake halibut libtool perl pkgconfig ];
|
2018-08-07 16:24:48 +02:00
|
|
|
buildInputs = []
|
|
|
|
++ lib.optionals hostPlatform.isUnix [ gtk2 ncurses ];
|
2017-10-21 18:15:47 +02:00
|
|
|
enableParallelBuilding = true;
|
2015-03-17 14:40:29 +01:00
|
|
|
|
2018-08-07 16:24:48 +02:00
|
|
|
meta = with lib; {
|
2015-03-17 14:40:29 +01: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 20:50:04 +02:00
|
|
|
homepage = https://www.chiark.greenend.org.uk/~sgtatham/putty/;
|
2015-03-17 14:40:29 +01:00
|
|
|
license = licenses.mit;
|
2018-08-07 16:24:48 +02:00
|
|
|
platforms = platforms.unix ++ platforms.windows;
|
2015-03-17 14:40:29 +01:00
|
|
|
};
|
2007-05-28 16:14:12 +02:00
|
|
|
}
|