NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.08k stars 14.13k forks source link

`wemux` package is missing `wemux.conf` #326056

Open bonsairobo opened 4 months ago

bonsairobo commented 4 months ago

Describe the bug

After installing wemux, I tried to run wemux start and nothing happened.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Add wemux to the environment.systemPackages list. Install with nixos-rebuild switch.
  2. Run wemux start
  3. Observe that nothing happens.

Expected behavior

wemux start is supposed to create and attach to a new tmux session.

Additional context

I looked at the derivation and the resulting /run/current-system/sw/bin/wemux bash script. I believe the main issue is at this line:

# Load configuration options from /etc/wemux.conf
 [ -f /etc/wemux.conf ] && . /etc/wemux.conf

There is no such /etc/wemux.conf after installing the package. The derivation for this package attempts to rename some paths:

https://github.com/NixOS/nixpkgs/blob/655a58a72a6601292512670343087c2d75d859c1/pkgs/tools/misc/wemux/default.nix#L19C5-L21C42

But it apparently did not work for this configuration file.

To confirm my hypothesis, I hacked it into "working" by doing:

Copying the file from here into /etc/wemux.conf and adding my user to the host_list seems to fix this.

Notify maintainers

@bsima

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.36, NixOS, 24.11 (Vicuna), 24.11.20240701.00d80d1`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.4`
 - channels(root): `"nixos-24.05"`
 - nixpkgs: `/nix/store/j4jzjbr302cw5bl0n3pch5j9bh5qwmaj-source`

Add a :+1: reaction to issues you find important.

bonsairobo commented 4 months ago

I would suggest looking at the diff caused by the string substitutions. Many of them are unexpected.