2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2023-02-02 18:25:31 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, autoreconfHook
|
|
|
|
, bison
|
|
|
|
, libevent
|
2022-06-16 17:23:12 +00:00
|
|
|
, ncurses
|
|
|
|
, pkg-config
|
2023-02-02 18:25:31 +00:00
|
|
|
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd
|
2022-11-27 09:42:12 +00:00
|
|
|
, withUtf8proc ? true, utf8proc # gets Unicode updates faster than glibc
|
2022-11-21 17:40:18 +00:00
|
|
|
, withUtempter ? stdenv.isLinux && !stdenv.hostPlatform.isMusl, libutempter
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
bashCompletion = fetchFromGitHub {
|
|
|
|
owner = "imomaliev";
|
|
|
|
repo = "tmux-bash-completion";
|
2020-11-03 02:18:15 +00:00
|
|
|
rev = "f5d53239f7658f8e8fbaf02535cc369009c436d6";
|
|
|
|
sha256 = "0sq2g3w0h3mkfa6qwqdw93chb5f1hgkz5vdl8yw8mxwdqwhsdprr";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tmux";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "3.3a";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tmux";
|
|
|
|
repo = "tmux";
|
|
|
|
rev = version;
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "sha256-SygHxTe7N4y7SdzKixPFQvqRRL57Fm8zWYHfTpW+yVY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
patches = [
|
|
|
|
./CVE-2022-47016.patch
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
autoreconfHook
|
|
|
|
bison
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
ncurses
|
|
|
|
libevent
|
2022-06-26 10:26:21 +00:00
|
|
|
] ++ lib.optionals withSystemd [ systemd ]
|
2022-11-27 09:42:12 +00:00
|
|
|
++ lib.optionals withUtf8proc [ utf8proc ]
|
2022-11-21 17:40:18 +00:00
|
|
|
++ lib.optionals withUtempter [ libutempter ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
2022-06-26 10:26:21 +00:00
|
|
|
] ++ lib.optionals withSystemd [ "--enable-systemd" ]
|
2022-11-21 17:40:18 +00:00
|
|
|
++ lib.optionals withUtempter [ "--enable-utempter" ]
|
2022-11-27 09:42:12 +00:00
|
|
|
++ lib.optionals withUtf8proc [ "--enable-utf8proc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/bash-completion/completions
|
|
|
|
cp -v ${bashCompletion}/completions/tmux $out/share/bash-completion/completions/tmux
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-11-03 02:18:15 +00:00
|
|
|
homepage = "https://tmux.github.io/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Terminal multiplexer";
|
2022-06-16 17:23:12 +00:00
|
|
|
longDescription = ''
|
|
|
|
tmux is intended to be a modern, BSD-licensed alternative to programs such as GNU screen. Major features include:
|
|
|
|
* A powerful, consistent, well-documented and easily scriptable command interface.
|
|
|
|
* A window may be split horizontally and vertically into panes.
|
|
|
|
* Panes can be freely moved and resized, or arranged into preset layouts.
|
|
|
|
* Support for UTF-8 and 256-colour terminals.
|
|
|
|
* Copy and paste with multiple buffers.
|
|
|
|
* Interactive menus to select windows, sessions or clients.
|
|
|
|
* Change the current window by searching for text in the target.
|
|
|
|
* Terminal locking, manually or after a timeout.
|
|
|
|
* A clean, easily extended, BSD-licensed codebase, under active development.
|
|
|
|
'';
|
2021-04-15 00:37:46 +00:00
|
|
|
changelog = "https://github.com/tmux/tmux/raw/${version}/CHANGES";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
platforms = lib.platforms.unix;
|
2022-10-21 18:38:19 +00:00
|
|
|
maintainers = with lib.maintainers; [ thammers fpletz SuperSandro2000 srapenne ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|