summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/tm/tmate-ssh-server/package.nix
blob: 02bf6c78506417926cdf03aaa2deaf3b406b2c55 (plain)
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
54
55
56
57
58
59
60
61
62
63
64
{
  lib,
  stdenv,
  fetchFromGitHub,
  autoreconfHook,
  cmake,
  libtool,
  pkg-config,
  zlib,
  openssl,
  libevent,
  ncurses,
  ruby,
  msgpack-c,
  libssh,
  nixosTests,
}:

stdenv.mkDerivation {
  pname = "tmate-ssh-server";
  version = "unstable-2023-06-02";

  src = fetchFromGitHub {
    owner = "tmate-io";
    repo = "tmate-ssh-server";
    rev = "d7334ee4c3c8036c27fb35c7a24df3a88a15676b";
    sha256 = "sha256-V3p0vagt13YjQPdqpbSatx5DnIEXL4t/kfxETSFYye0=";
  };

  postPatch = ''
    substituteInPlace configure.ac \
      --replace 'msgpack >= 1.2.0' 'msgpack-c >= 1.2.0'
  '';

  nativeBuildInputs = [
    autoreconfHook
    cmake
    pkg-config
  ];

  buildInputs = [
    libtool
    zlib
    openssl
    libevent
    ncurses
    ruby
    msgpack-c
    libssh
  ];

  dontUseCmakeConfigure = true;

  passthru.tests.tmate-ssh-server = nixosTests.tmate-ssh-server;

  meta = {
    homepage = "https://tmate.io/";
    description = "tmate SSH Server";
    license = lib.licenses.mit;
    platforms = lib.platforms.unix;
    maintainers = with lib.maintainers; [ ck3d ];
    mainProgram = "tmate-ssh-server";
  };
}