@@ -1,17 +1,20 @@
1−{ stdenv, fetchurl, autoreconfHook, pkgconfig
2−, ncurses, libiconv }:
1+{ stdenv, fetchgit, autoreconfHook, makeWrapper, pkgconfig
2+, lrzsz, ncurses, libiconv }:
33
44stdenv.mkDerivation rec {
5− name = "minicom-2.7.1";
6−
7− src = fetchurl {
8− url = "https://alioth.debian.org/frs/download.php/latestfile/3/${name}.tar.gz";
9− sha256 = "1wa1l36fa4npd21xa9nz60yrqwkk5cq713fa3p5v0zk7g9mq6bsk";
5+ name = "minicom-${version}";
6+ version = "2.7.1";
7+
8+ # The repository isn't tagged properly, so we need to use commit refs
9+ src = fetchgit {
10+ url = "https://salsa.debian.org/minicom-team/minicom.git";
11+ rev = "6ea8033b6864aa35d14fb8b87e104e4f783635ce";
12+ sha256 = "0j95727xni4r122dalp09963gvc1nqa18l1d4wzz8746kw5s2rrb";
1013 };
1114
1215 buildInputs = [ ncurses ] ++ stdenv.lib.optional stdenv.isDarwin libiconv;
1316
14− nativeBuildInputs = [ autoreconfHook pkgconfig ];
17+ nativeBuildInputs = [ autoreconfHook makeWrapper pkgconfig ];
1518
1619 enableParallelBuilding = true;
1720
@@ -26,18 +29,22 @@ stdenv.mkDerivation rec {
2629 # Have `configure' assume that the lock directory exists.
2730 substituteInPlace configure \
2831 --replace 'test -d $UUCPLOCK' true
32+ '';
2933
30− substituteInPlace src/rwconf.c \
31− --replace /usr/bin/ascii-xfr $out/bin/ascii-xfr
34+ postInstall = ''
35+ for f in $out/bin/*minicom ; do
36+ wrapProgram $f \
37+ --prefix PATH : ${stdenv.lib.makeBinPath [ lrzsz ]}:$out/bin
38+ done
3239 '';
3340
3441 meta = with stdenv.lib; {
3542 description = "Modem control and terminal emulation program";
36− homepage = https://alioth.debian.org/projects/minicom/;
43+ homepage = https://salsa.debian.org/minicom-team/minicom;
3744 license = licenses.gpl2;
3845 longDescription = ''
39− Minicom is a menu driven communications program. It emulates ANSI
40− and VT102 terminals. It has a dialing directory and auto zmodem
46+ Minicom is a menu driven communications program. It emulates ANSI
47+ and VT102 terminals. It has a dialing directory and auto zmodem
4148 download.
4249 '';
4350 maintainers = with maintainers; [ peterhoeg ];