about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@users.noreply.github.com>2016-05-18 19:01:44 +0200
committerJoachim Fasting <joachifm@users.noreply.github.com>2016-05-18 19:01:44 +0200
commit10348ecd4682f421a17e83bf8f0d46d427245a6e (patch)
treef2a0be479ebe0da9194f0cf4d22112570a5dd8af /pkgs
parent455a4aebe0b83b09aac7418072066f86976aa40a (diff)
parent60025e35248193b37dc5f6b5f18f8eb33bea2c3c (diff)
Merge pull request #15534 from peterhoeg/tmux
tmux module: add additional variables for configuring tmux
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/misc/tmux/default.nix11
1 files changed, 7 insertions, 4 deletions
diff --git a/pkgs/tools/misc/tmux/default.nix b/pkgs/tools/misc/tmux/default.nix
index 7bd79b3088598..4f8a5c05b1820 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 = {