Confusing errors/suggestions

I’ve been trying to use pw-jack, and I’ve enabled & installed pipewire.
However, I get:

-> % pw-jack
The program 'pw-jack' is currently not installed. You can install it
by typing:
  nix-env -iA nixpkgs.pipewire.out

Or run it once with:
  nix-shell -p pipewire.out --run ...
-> % nix-shell -p pipewire.out                                                                                                                                                                                          <<<

[nix-shell:~]$ pw-jack
The program 'pw-jack' is not in your PATH. You can make it available in an
ephemeral shell by typing:
  nix-shell -p pipewire

Which means that Nix provides invalid suggestions. I’m assuming this is derived from the outputs of a derivation.

However, pipewire also has an output named jack, so you actually need:

nix-shell -p pipewire.jack 

Which should’ve been the suggestion to try from Nix.

This can be improved.

23.05.419.3a70dd92993 (Stoat)
2 Likes

https://github.com/NixOS/nixpkgs/issues/129713

2 Likes

It’s frustrating that this is how I figured out that I needed pipewire.jack, but at the same time I really appreciate that you made this post. Thanks!

1 Like

Just use nix-locate from GitHub - nix-community/nix-index-database: Weekly updated nix-index database [maintainer=@Mic92], it will give you the correct output to use.

$ nix-locate -w /bin/pw-jack
pipewire.jack                                     1,386 x /nix/store/1msx6gm9xbg43bxi0ydhbc7j8ayrsl04-pipewire-1.4.7-jack/bin/pw-jack

This should be on the wiki

1 Like

Feel free to add it, everyone has access to edit it :slight_smile:

2 Likes

I don’t know enough to comfortably contribute to Nix learning materials

Anyone with the confidence to stand up in public and say, ‘This should be on the wiki,’ (or in the manual, or in any other plain-English public source of Nix information) should have the confidence to put it on the wiki (or submit a PR, etc.). You know better than anyone else in the world the change you want to see.

2 Likes

No this I strongly disagree with. Being able to identify a gap in information and being able to fill it without misinforming people is a very different thing.

For example on Wikipedia I might make an edit fixing a formatting, word use, or other mistake- but I’m not going to add a section to a randomness page explaining the physics of why atomic clocks are random, because I don’t understand it, even if I think it should be added.

I was able to get pw-jack working for me but I don’t have enough Nix language(or sound server) knowledge to explain it in a generally useful way.

Edit: To expand, could I learn it, yes, I think almost anyone could learn almost anything. But a lot of people here already have a better understanding of it, just maybe wouldn’t otherwise think of adding it to the wiki(because when you do know something its easy to forget what it was like to not). In the future(maybe even near future), I could be one of the people confident enough to add it, but that is not me now.

You’ve spent more effort writing this reply to me than it would have taken to drop a link to this topic on the appropriate wiki page, with a sentence or two about why you found it helpful and/or whatever caveats about your inexperience you think are necessary.

3 Likes

I agree(to some extent, I do write long comments/arguments all the time so its not thaaat much) on effort(maybe that shows that my reluctance to do it myself is not about laziness).

I’ll try to explain where I feel stuck on adding it myself and you can teach me if you want.

Presumably I’d put it on this page PipeWire - Official NixOS Wiki as it explains basic pipewire config(with the wrappers, I’m not sure if wrappers is the correct terms, adapters, or something else)

I’m not sure if services.pipewire.jack.enable does anything without pw-jack being invoked, so I assume it shouldn’t be under the general “Configuring PipeWire” category. (And conversely I’m not sure if it has to be enable for pw-jack to work.) These two questions are answerable just by rebuilding my system, but that would be an hour of rebuilding.

I’d probably put it under “Advanced Configuration” with a subcategory like “Using pw-jack", and then I don’t know what I’d put for it. Just a code example of using pkgs.pipewire.jack in my systemPackages? Whether I’d say JACK has to be enable would depend on my previous question.

Or just drop the link in “See Also”, but that is not exactly useful to most readers I don’t think have an unannotated link dropped at the end of the article. Maybe I could do “Using pw-jack - [link]” but I don’t see that in the other “See Also” links so I don’t know if it fits the style.

Obviously its not impossible, I’m just explaining why it can make more sense for someone already more knowledgeable than I to do it. After all, I’m sure you’ve both submitted PRs and bug reports for open source projects, often a bug report is less burdensome for both maintainers and users than a newbies attempt at a change.

Generally that sort of thing(talking about the specific editor) doesn’t fit the style of a wiki(IMO), unless you mean in the talk page/edit explanation.

Again: you are the world’s foremost expert on why you think this (for whatever value of ‘this’) should be on the wiki.

Example: you think this should be on the wiki because you went to the wiki before finding this Discourse topic, and found yourself frustrated with the information there because it didn’t solve your problem. So: what pages and sections did you read, in what order? Where would a link to this topic have cut off your search first? Put it there.

Don’t over-index on matching the existing style or tone. Wiki is worse-is-better documentation. Anyone who disagrees with what you write or how you write it can come along and clean it up afterward. Focus on making the wiki more helpful than it was before you edited it. It doesn’t have to be maximally helpful. It doesn’t have to read like an authoritative article written by an expert. It just has to help with the problem that motivated you to necro a years-old topic with, ‘This should be on the wiki.’

5 Likes

I guess that’s a different approach compared to what I’m used to (the only wiki I’ve really edited much is Wikipedia- where avoiding low quality content is sometimes more important than including everything). I still don’t feel comfortable adding a whole section with the information gap I listed, but I did just add a line to the “See Also” section

3 Likes