2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, ncurses }:
|
2019-07-30 07:39:13 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mtm";
|
2021-10-09 03:48:08 +02:00
|
|
|
version = "1.2.1";
|
|
|
|
|
|
|
|
outputs = [ "out" "terminfo" ];
|
2019-07-30 07:39:13 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deadpixi";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-10-09 03:48:08 +02:00
|
|
|
sha256 = "0gibrvah059z37jvn1qs4b6kvd4ivk2mfihmcpgx1vz6yg70zghv";
|
2019-07-30 07:39:13 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
|
2021-10-09 03:48:08 +02:00
|
|
|
makeFlags = [ "DESTDIR=${placeholder "out"}" "MANDIR=${placeholder "out"}/share/man/man1" ];
|
2019-07-30 07:39:13 +02:00
|
|
|
|
2021-10-09 03:48:08 +02:00
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/bin/ $out/share/man/man1
|
|
|
|
'';
|
2019-07-30 07:39:13 +02:00
|
|
|
|
2021-10-09 03:48:08 +02:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $terminfo/share/terminfo $out/nix-support
|
|
|
|
tic -x -o $terminfo/share/terminfo mtm.ti
|
|
|
|
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
|
2019-07-30 07:39:13 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-07-30 07:39:13 +02:00
|
|
|
description = "Perhaps the smallest useful terminal multiplexer in the world";
|
|
|
|
homepage = "https://github.com/deadpixi/mtm";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|