Files
nixpkgs/pkgs/by-name/pu/putty/package.nix
2026-07-08 15:33:27 -05:00

86 lines
1.9 KiB
Nix

{
stdenv,
lib,
fetchurl,
cmake,
perl,
pkg-config,
gtk3,
gtk3-x11,
ncurses,
copyDesktopItems,
makeDesktopItem,
}:
let
gtk3' = if stdenv.hostPlatform.isDarwin then gtk3-x11 else gtk3;
in
stdenv.mkDerivation (finalAttrs: {
version = "0.84";
pname = "putty";
src = fetchurl {
urls = [
"https://the.earth.li/~sgtatham/putty/${finalAttrs.version}/putty-${finalAttrs.version}.tar.gz"
"ftp://ftp.wayne.edu/putty/putty-website-mirror/${finalAttrs.version}/putty-${finalAttrs.version}.tar.gz"
];
hash = "sha256-BgV4Yq4Zjx29IZ0MdJMIDVn2BhlLtQVsVJ40KqAbaf4=";
};
strictDeps = true;
__structuredAttrs = true;
nativeBuildInputs = [
cmake
perl
pkg-config
copyDesktopItems
];
buildInputs = lib.optionals stdenv.hostPlatform.isUnix [
gtk3'
ncurses
];
enableParallelBuilding = true;
desktopItems = [
(makeDesktopItem {
name = "PuTTY SSH Client";
exec = "putty";
icon = "putty";
desktopName = "PuTTY";
comment = "Connect to an SSH server with PuTTY";
categories = [
"GTK"
"Network"
];
})
(makeDesktopItem {
name = "PuTTY Terminal Emulator";
exec = "pterm";
icon = "pterm";
desktopName = "Pterm";
comment = "Start a PuTTY terminal session";
categories = [
"GTK"
"System"
"Utility"
"TerminalEmulator"
];
})
];
meta = {
maintainers = with lib.maintainers; [ aprl ];
description = "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 = lib.licenses.mit;
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
})