From 60025e35248193b37dc5f6b5f18f8eb33bea2c3c Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Thu, 31 Mar 2016 23:22:17 +0800 Subject: tmux module: add additional variables for configuring tmux Also wraps the tmux binary, so that sockets are stored under /run --- pkgs/tools/misc/tmux/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'pkgs/tools/misc') diff --git a/pkgs/tools/misc/tmux/default.nix b/pkgs/tools/misc/tmux/default.nix index 7bd79b308859..4f8a5c05b182 100644 --- a/pkgs/tools/misc/tmux/default.nix +++ b/pkgs/tools/misc/tmux/default.nix @@ -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 = { -- cgit 1.4.1