tmux-python / tmux-python/tmuxp

$PATH Pollution on NixOS

Open
#979 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4.6k
Forks
248
Avg merge
2h 13m
Merged PRs (30d)
1

Description

Version Information:

  • Linux NixOS 25.05 (Warbler) x86_64
  • tmuxp 1.50.1
  • tmux 3.5a
  • Bash 5.2.37(1)-release

When loading tmuxp sessions, $PATH gets polluted with paths to python and tmuxp. For example, when I load a session, echo "$PATH" prints /nix/store/fqm9bqqlmaqqr02qbalm1bazp810qfiw-python3-3.12.9/bin:/nix/store/y2r9mrjwnjbj2mqai0949am04z6ckw4g-tmuxp-1.50.1/bin before my usual $PATH. These paths are where Nix stores tmuxp's binaries as well as the binaries for the version of python it uses.

This only happens when I load with tmuxp. Just using tmux new does not cause this bug. It also doesn't happen outside of tmux.
This happens with a completely blank tmux config that has nothing except for set-option -g default-shell /<...>/shellbin, where shellbin is a bash script I created that runs bash with --noprofile and --norc.
Essentially, a blank tmux and bash config.
This bug happens with both my custom tmuxp sessions and also the example on the README.md

Should be able to reproduce with tmuxp load mysession with ~/.tmuxp/mysession.yaml containing the example from the README.md with no bash/tmux config on NixOS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce with tmuxp load mysession using the README.md session example on NixOS, a blank tmux configuration, and the bash wrapper described in the report. Trace the tmuxp load entry point's environment setup and compare its PATH with plain tmux new; done means loading the session no longer prepends the Python and tmuxp Nix-store paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, linux, python
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.