minicom: fix paths to helper binaries and new upstream

This commit is contained in:
Peter Hoeg 2018-09-17 15:05:36 +08:00
parent da1a2b1eea
commit 358632e0d3

View File

@ -1,17 +1,20 @@
{ stdenv, fetchurl, autoreconfHook, pkgconfig
, ncurses, libiconv }:
{ stdenv, fetchgit, autoreconfHook, makeWrapper, pkgconfig
, lrzsz, ncurses, libiconv }:
stdenv.mkDerivation rec {
name = "minicom-2.7.1";
name = "minicom-${version}";
version = "2.7.1";
src = fetchurl {
url = "https://alioth.debian.org/frs/download.php/latestfile/3/${name}.tar.gz";
sha256 = "1wa1l36fa4npd21xa9nz60yrqwkk5cq713fa3p5v0zk7g9mq6bsk";
# The repository isn't tagged properly, so we need to use commit refs
src = fetchgit {
url = "https://salsa.debian.org/minicom-team/minicom.git";
rev = "6ea8033b6864aa35d14fb8b87e104e4f783635ce";
sha256 = "0j95727xni4r122dalp09963gvc1nqa18l1d4wzz8746kw5s2rrb";
};
buildInputs = [ ncurses ] ++ stdenv.lib.optional stdenv.isDarwin libiconv;
nativeBuildInputs = [ autoreconfHook pkgconfig ];
nativeBuildInputs = [ autoreconfHook makeWrapper pkgconfig ];
enableParallelBuilding = true;
@ -26,14 +29,18 @@ stdenv.mkDerivation rec {
# 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
postInstall = ''
for f in $out/bin/*minicom ; do
wrapProgram $f \
--prefix PATH : ${stdenv.lib.makeBinPath [ lrzsz ]}:$out/bin
done
'';
meta = with stdenv.lib; {
description = "Modem control and terminal emulation program";
homepage = https://alioth.debian.org/projects/minicom/;
homepage = https://salsa.debian.org/minicom-team/minicom;
license = licenses.gpl2;
longDescription = ''
Minicom is a menu driven communications program. It emulates ANSI