summary refs log tree commit diff
path: root/pkgs/tools/misc/minicom/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/minicom/default.nix')
-rw-r--r--pkgs/tools/misc/minicom/default.nix52
1 files changed, 33 insertions, 19 deletions
diff --git a/pkgs/tools/misc/minicom/default.nix b/pkgs/tools/misc/minicom/default.nix
index d731e856790..5796f6335c0 100644
--- a/pkgs/tools/misc/minicom/default.nix
+++ b/pkgs/tools/misc/minicom/default.nix
@@ -1,32 +1,46 @@
-{ stdenv, fetchurl, ncurses }:
+{ stdenv, fetchurl, autoreconfHook, pkgconfig
+, ncurses }:
 
 stdenv.mkDerivation rec {
-  name = "minicom-2.7";
+  name = "minicom-2.7.1";
 
   src = fetchurl {
-    url = "http://alioth.debian.org/frs/download.php/file/3977/${name}.tar.gz";
-    sha256 = "1x04m4k7c71j5cnhzpjrbz43dd96k4mpkd0l87v5skrgp1isdhws";
+    url    = "https://alioth.debian.org/frs/download.php/latestfile/3/${name}.tar.gz";
+    sha256 = "1wa1l36fa4npd21xa9nz60yrqwkk5cq713fa3p5v0zk7g9mq6bsk";
   };
 
-  buildInputs = [ncurses];
+  buildInputs = [ ncurses ];
 
-  configureFlags = [ "--sysconfdir=/etc" "--enable-lock-dir=/var/lock" ];
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
 
-  preConfigure =
-    # Have `configure' assume that the lock directory exists.
-    '' sed -i "configure" -e's/test -d \$UUCPLOCK/true/g'
-    '';
+  enableParallelBuilding = true;
 
-  meta = {
-    description = "Modem control and terminal emulation program";
-    homepage = http://alioth.debian.org/projects/minicom/;
+  configureFlags = [
+    "--sysconfdir=/etc"
+    "--enable-lock-dir=/var/lock"
+  ];
+
+  patches = [ ./xminicom_terminal_paths.patch ];
 
-    longDescription =
-      '' Minicom is a menu driven communications program.  It emulates ANSI
-         and VT102 terminals.  It has a dialing directory and auto zmodem
-         download.
-      '';
+  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
+  '';
 
-    platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
+  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;
   };
 }