1{ lib, stdenv, fetchurl, readline }:
2
3let
4 version = "1.5c";
5in stdenv.mkDerivation rec {
6 pname = "zssh";
7 inherit version;
8
9 src = fetchurl {
10 url = "mirror://sourceforge/zssh/${pname}-${version}.tgz";
11 sha256 = "06z73iq59lz8ibjrgs7d3xl39vh9yld1988yx8khssch4pw41s52";
12 };
13
14 buildInputs = [ readline ];
15
16 patches = [
17 # Cargo-culted from Arch, returns “out of pty's” without it
18 (fetchurl {
19 name = "fix_use_ptmx_on_arch.patch";
20 url = "https://raw.githubusercontent.com/archlinux/svntogit-community/0a7c92543f9309856d02e31196f06d7c3eaa8b67/trunk/fix_use_ptmx_on_arch.patch";
21 sha256 = "12daw9wpy58ql882zww945wk9cg2adwp8qsr5rvazx0xq0qawgbr";
22 })
23 ];
24
25 patchFlags = [ "-p0" ];
26
27 # The makefile does not create the directories
28 postBuild = ''
29 install -dm755 "$out"/{bin,man/man1}
30 '';
31
32 meta = {
33 description = "SSH and Telnet client with ZMODEM file transfer capability";
34 homepage = "https://zssh.sourceforge.net/";
35 license = lib.licenses.gpl2;
36 maintainers = [ ]; # required by deepin-terminal
37 platforms = lib.platforms.linux;
38 };
39}