about summary refs log tree commit diff
path: root/pkgs/applications/networking/remote/putty/default.nix
blob: df95f5b9d6f74e9f6c1679be2a4b3f33993ac318 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ stdenv, lib, fetchurl, cmake, perl, pkg-config
, gtk3, ncurses, darwin, copyDesktopItems, makeDesktopItem
}:

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

  nativeBuildInputs = [ cmake perl pkg-config copyDesktopItems ];
  buildInputs = lib.optionals stdenv.hostPlatform.isUnix [
    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 = ''
      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;
    platforms = platforms.unix ++ platforms.windows;
  };
}