From 358632e0d3f6a36c417ab855051878834a55a473 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Mon, 17 Sep 2018 15:05:36 +0800 Subject: [PATCH] minicom: fix paths to helper binaries and new upstream --- pkgs/tools/misc/minicom/default.nix | 31 ++++++++++++++++++----------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/pkgs/tools/misc/minicom/default.nix b/pkgs/tools/misc/minicom/default.nix index 326a3b053ed..3c2ed135225 100644 --- a/pkgs/tools/misc/minicom/default.nix +++ b/pkgs/tools/misc/minicom/default.nix @@ -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,18 +29,22 @@ 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 - and VT102 terminals. It has a dialing directory and auto zmodem + 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 ];