tmux module: add additional variables for configuring tmux

Also wraps the tmux binary, so that sockets are stored under /run
This commit is contained in:
Peter Hoeg
2016-05-18 19:24:03 +08:00
parent d541e0dc1c
commit 60025e3524
2 changed files with 140 additions and 9 deletions
+7 -4
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook, ncurses, libevent, pkgconfig }:
{ stdenv, fetchFromGitHub, autoreconfHook, ncurses, libevent, pkgconfig, makeWrapper }:
let
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig autoreconfHook ];
buildInputs = [ ncurses libevent ];
buildInputs = [ ncurses libevent makeWrapper ];
configureFlags = [
"--sysconfdir=/etc"
@@ -32,8 +32,11 @@ stdenv.mkDerivation rec {
];
postInstall = ''
mkdir -p $out/etc/bash_completion.d
cp -v ${bashCompletion}/completions/tmux $out/etc/bash_completion.d/tmux
mkdir -p $out/share/bash-completion/completions
cp -v ${bashCompletion}/completions/tmux $out/share/bash-completion/completions/tmux
wrapProgram $out/bin/tmux \
--set TMUX_TMPDIR \''${XDG_RUNTIME_DIR:-"/run/user/\$(id -u)"}
'';
meta = {