2021-01-19 06:50:56 +00:00
|
|
|
{ stdenv, lib, fetchurl, autoconf, automake, pkg-config, libtool
|
2019-10-16 23:36:47 +00:00
|
|
|
, gtk2, halibut, ncurses, perl, darwin
|
2018-08-20 18:43:41 +00:00
|
|
|
}:
|
2015-03-17 13:40:29 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-07-06 05:46:03 +00:00
|
|
|
version = "0.74";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "putty";
|
2015-03-17 13:40:29 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-10-21 16:15:47 +00:00
|
|
|
urls = [
|
2019-08-15 12:41:18 +00:00
|
|
|
"https://the.earth.li/~sgtatham/putty/${version}/${pname}-${version}.tar.gz"
|
|
|
|
"ftp://ftp.wayne.edu/putty/putty-website-mirror/${version}/${pname}-${version}.tar.gz"
|
2017-10-21 16:15:47 +00:00
|
|
|
];
|
2020-07-06 05:46:03 +00:00
|
|
|
sha256 = "0zc43g8ycyf712cdrja4k8ih5s3agw1k0nq0jkifdn8xwn4d7mfx";
|
2015-03-17 13:40:29 +00:00
|
|
|
};
|
2010-05-07 14:18:00 +00:00
|
|
|
|
2019-09-15 00:20:32 +00:00
|
|
|
# glib-2.62 deprecations
|
2019-10-30 11:34:47 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
|
2019-09-15 00:20:32 +00:00
|
|
|
|
2018-08-20 18:43:41 +00:00
|
|
|
preConfigure = lib.optionalString stdenv.hostPlatform.isUnix ''
|
2010-05-07 14:18:00 +00:00
|
|
|
perl mkfiles.pl
|
|
|
|
( cd doc ; make );
|
2012-10-30 08:49:43 +00:00
|
|
|
./mkauto.sh
|
2010-05-07 14:18:00 +00:00
|
|
|
cd unix
|
2018-08-20 18:43:41 +00:00
|
|
|
'' + lib.optionalString stdenv.hostPlatform.isWindows ''
|
2018-08-07 14:24:48 +00:00
|
|
|
cd windows
|
2010-05-07 14:18:00 +00:00
|
|
|
'';
|
2007-05-28 14:14:12 +00:00
|
|
|
|
2018-08-07 14:24:48 +00:00
|
|
|
TOOLPATH = stdenv.cc.targetPrefix;
|
2018-08-20 18:43:41 +00:00
|
|
|
makefile = if stdenv.hostPlatform.isWindows then "Makefile.mgw" else null;
|
2018-08-07 14:24:48 +00:00
|
|
|
|
2018-08-20 18:43:41 +00:00
|
|
|
installPhase = if stdenv.hostPlatform.isWindows then ''
|
2018-08-07 14:24:48 +00:00
|
|
|
for exe in *.exe; do
|
|
|
|
install -D $exe $out/bin/$exe
|
|
|
|
done
|
|
|
|
'' else null;
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoconf automake halibut libtool perl pkg-config ];
|
2018-08-20 18:43:41 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isUnix [
|
|
|
|
gtk2 ncurses
|
2019-10-16 23:36:47 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.libs.utmp;
|
2017-10-21 16:15:47 +00:00
|
|
|
enableParallelBuilding = true;
|
2015-03-17 13:40:29 +00:00
|
|
|
|
2018-08-07 14:24:48 +00:00
|
|
|
meta = with lib; {
|
2015-03-17 13:40:29 +00: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.
|
|
|
|
'';
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.chiark.greenend.org.uk/~sgtatham/putty/";
|
2015-03-17 13:40:29 +00:00
|
|
|
license = licenses.mit;
|
2018-08-07 14:24:48 +00:00
|
|
|
platforms = platforms.unix ++ platforms.windows;
|
2015-03-17 13:40:29 +00:00
|
|
|
};
|
2007-05-28 14:14:12 +00:00
|
|
|
}
|