Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[23.11] putty: 0.76 -> 0.81 #304468

Merged
merged 3 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 25 additions & 27 deletions pkgs/applications/networking/remote/putty/default.nix
Original file line number Diff line number Diff line change
@@ -1,46 +1,44 @@
{ stdenv, lib, fetchurl, autoconf, automake, pkg-config, libtool
, gtk2, halibut, ncurses, perl, darwin
{ stdenv, lib, fetchurl, cmake, perl, pkg-config
, gtk3, ncurses, darwin, copyDesktopItems, makeDesktopItem
}:

stdenv.mkDerivation rec {
version = "0.76";
version = "0.81";
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"
];
sha256 = "0gvi8phabszqksj2by5jrjmshm7bpirhgavz0dqyz1xaimxdjz2l";
hash = "sha256-y4sAqU9FNJTjRaPfKB16PtJrsN1+NiZPFFIG+IV2Of4=";
};

# glib-2.62 deprecations
env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";

preConfigure = lib.optionalString stdenv.hostPlatform.isUnix ''
perl mkfiles.pl
( cd doc ; make );
./mkauto.sh
cd unix
'' + lib.optionalString stdenv.hostPlatform.isWindows ''
cd windows
'';

TOOLPATH = stdenv.cc.targetPrefix;
makefile = if stdenv.hostPlatform.isWindows then "Makefile.mgw" else null;

installPhase = if stdenv.hostPlatform.isWindows then ''
for exe in *.exe; do
install -D $exe $out/bin/$exe
done
'' else null;

nativeBuildInputs = [ autoconf automake halibut libtool perl pkg-config ];
nativeBuildInputs = [ cmake perl pkg-config copyDesktopItems ];
buildInputs = lib.optionals stdenv.hostPlatform.isUnix [
gtk2 ncurses
gtk3 ncurses
] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.libs.utmp;
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 = with lib; {
description = "A Free Telnet/SSH Client";
longDescription = ''
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41009,7 +41009,7 @@ with pkgs;
pwntools = with python3Packages; toPythonApplication pwntools;

putty = callPackage ../applications/networking/remote/putty {
gtk2 = gtk2-x11;
gtk3 = if stdenv.isDarwin then gtk3-x11 else gtk3;
};

qMasterPassword = libsForQt5.callPackage ../applications/misc/qMasterPassword { };
Expand Down
Loading