3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/remote/putty/default.nix

56 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchurl, autoconf, automake, pkgconfig, libtool
2018-08-07 15:24:48 +01:00
, gtk2, halibut, ncurses, perl
}:
stdenv.mkDerivation rec {
2019-03-18 17:24:45 +00:00
version = "0.71";
name = "putty-${version}";
src = fetchurl {
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 17:24:45 +00:00
sha256 = "1f66iss0kqk982azmxbk4xfm2i1csby91vdvly6cr04pz3i1r4rg";
};
preConfigure = lib.optionalString stdenv.hostPlatform.isUnix ''
perl mkfiles.pl
( cd doc ; make );
2015-07-27 00:52:24 +01: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 08:49:43 +00:00
./mkauto.sh
cd unix
'' + lib.optionalString stdenv.hostPlatform.isWindows ''
2018-08-07 15:24:48 +01:00
cd windows
'';
2018-08-07 15:24:48 +01:00
TOOLPATH = stdenv.cc.targetPrefix;
makefile = if stdenv.hostPlatform.isWindows then "Makefile.mgw" else null;
2018-08-07 15:24:48 +01:00
installPhase = if stdenv.hostPlatform.isWindows then ''
2018-08-07 15:24:48 +01:00
for exe in *.exe; do
install -D $exe $out/bin/$exe
done
'' else null;
nativeBuildInputs = [ autoconf automake halibut libtool perl pkgconfig ];
buildInputs = lib.optionals stdenv.hostPlatform.isUnix [
gtk2 ncurses
];
enableParallelBuilding = true;
2018-08-07 15:24:48 +01:00
meta = with lib; {
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.
'';
homepage = https://www.chiark.greenend.org.uk/~sgtatham/putty/;
license = licenses.mit;
2018-08-07 15:24:48 +01:00
platforms = platforms.unix ++ platforms.windows;
};
}