summary refs log tree commit diff
path: root/pkgs/tools/misc/minicom/default.nix
blob: 5796f6335c0bd6651f58a96e4c4a74bcae1b8c24 (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
{ stdenv, fetchurl, autoreconfHook, pkgconfig
, ncurses }:

stdenv.mkDerivation rec {
  name = "minicom-2.7.1";

  src = fetchurl {
    url    = "https://alioth.debian.org/frs/download.php/latestfile/3/${name}.tar.gz";
    sha256 = "1wa1l36fa4npd21xa9nz60yrqwkk5cq713fa3p5v0zk7g9mq6bsk";
  };

  buildInputs = [ ncurses ];

  nativeBuildInputs = [ autoreconfHook pkgconfig ];

  enableParallelBuilding = true;

  configureFlags = [
    "--sysconfdir=/etc"
    "--enable-lock-dir=/var/lock"
  ];

  patches = [ ./xminicom_terminal_paths.patch ];

  preConfigure = ''
    # Have `configure' assume that the lock directory exists.
    substituteInPlace configure \
      --replace 'test -d $UUCPLOCK' true

    substituteInPlace src/rwconf.c \
      --replace /usr/bin/ascii-xfr $out/bin/ascii-xfr
  '';

  meta = with stdenv.lib; {
    description = "Modem control and terminal emulation program";
    homepage = https://alioth.debian.org/projects/minicom/;
    license = licenses.gpl2;
    longDescription = ''
      Minicom is a menu driven communications program.  It emulates ANSI
      and VT102 terminals.  It has a dialing directory and auto zmodem
      download.
    '';
    maintainers = with maintainers; [ peterhoeg ];
    platforms = platforms.linux;
  };
}