nixpkgs/pkgs/applications/networking/remote/putty/default.nix

56 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchurl, autoconf, automake, pkg-config, libtool
, gtk2, halibut, ncurses, perl, darwin
}:
stdenv.mkDerivation rec {
2020-07-06 05:46:03 +00:00
version = "0.74";
pname = "putty";
src = fetchurl {
urls = [
"https://the.earth.li/~sgtatham/putty/${version}/${pname}-${version}.tar.gz"
"ftp://ftp.wayne.edu/putty/putty-website-mirror/${version}/${pname}-${version}.tar.gz"
];
2020-07-06 05:46:03 +00:00
sha256 = "0zc43g8ycyf712cdrja4k8ih5s3agw1k0nq0jkifdn8xwn4d7mfx";
};
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
preConfigure = lib.optionalString stdenv.hostPlatform.isUnix ''
perl mkfiles.pl
( cd doc ; make );
2012-10-30 08:49:43 +00:00
./mkauto.sh
cd unix
'' + lib.optionalString stdenv.hostPlatform.isWindows ''
2018-08-07 14:24:48 +00:00
cd windows
'';
2018-08-07 14:24:48 +00:00
TOOLPATH = stdenv.cc.targetPrefix;
makefile = if stdenv.hostPlatform.isWindows then "Makefile.mgw" else null;
2018-08-07 14:24:48 +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;
nativeBuildInputs = [ autoconf automake halibut libtool perl pkg-config ];
buildInputs = lib.optionals stdenv.hostPlatform.isUnix [
gtk2 ncurses
] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.libs.utmp;
enableParallelBuilding = true;
2018-08-07 14:24:48 +00: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 14:24:48 +00:00
platforms = platforms.unix ++ platforms.windows;
};
}