Skip to content

qman: init at 1.5.1#434438

Open
yzhou216 wants to merge 1 commit intoNixOS:masterfrom
yzhou216:qman-init
Open

qman: init at 1.5.1#434438
yzhou216 wants to merge 1 commit intoNixOS:masterfrom
yzhou216:qman-init

Conversation

@yzhou216
Copy link
Contributor

@yzhou216 yzhou216 commented Aug 17, 2025

Things done


Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Aug 17, 2025
@yzhou216

This comment was marked as outdated.

@nixpkgs-ci nixpkgs-ci bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Aug 17, 2025
@yzhou216 yzhou216 force-pushed the qman-init branch 2 times, most recently from 3ce6c54 to dacf607 Compare August 17, 2025 10:40
@AaronVerDow
Copy link
Contributor

I had to add documentation.man.generateCaches = true; to my configuration.nix for this to work, but I don't think that's within the scope of an individual package.

Added this to my personal configs, looks good and works well.

@yzhou216
Copy link
Contributor Author

I had to add documentation.man.generateCaches = true; to my configuration.nix for this to work, but I don't think that's within the scope of an individual package.

Added this to my personal configs, looks good and works well.

Interesting, I didn't have to enable that. What do you mean by not working?

@AaronVerDow
Copy link
Contributor

I had to add documentation.man.generateCaches = true; to my configuration.nix for this to work, but I don't think that's within the scope of an individual package.
Added this to my personal configs, looks good and works well.

Interesting, I didn't have to enable that. What do you mean by not working?

I get the error:

'apropos .' failed; did you run mandb/makewhatis?

@yzhou216
Copy link
Contributor Author

I had to add documentation.man.generateCaches = true; to my configuration.nix for this to work, but I don't think that's within the scope of an individual package.
Added this to my personal configs, looks good and works well.

Interesting, I didn't have to enable that. What do you mean by not working?

I get the error:

'apropos .' failed; did you run mandb/makewhatis?

Is documentation.man.generateCaches = true; slow for you? It takes forever on my machine, maybe something is blocking.

@yzhou216
Copy link
Contributor Author

@kpbaks Does this look okay to you? I also had issues with versionCheckHook, any ideal on how to work around it?

@kpbaks
Copy link
Contributor

kpbaks commented Aug 19, 2025

@kpbaks Does this look okay to you? I also had issues with versionCheckHook, any ideal on how to work around it?

Yes LGTM. I have not come up with a way to solve the issue with versionCheckHook. My only hunch is that the version() function in the qman codebase outputs a string array of wchar_t and not char. But when I run

[[ $(qman --version) =~ "1.5.0" ]] && echo "matches"

it matches. Let's just leave it out for now.

@AaronVerDow
Copy link
Contributor

I had to add documentation.man.generateCaches = true; to my configuration.nix for this to work, but I don't think that's within the scope of an individual package.
Added this to my personal configs, looks good and works well.

Interesting, I didn't have to enable that. What do you mean by not working?

I get the error:

'apropos .' failed; did you run mandb/makewhatis?

Is documentation.man.generateCaches = true; slow for you? It takes forever on my machine, maybe something is blocking.

Not that I had noticed. I'm not sure how qman works without that option, on NixOS at least. Nixpkgs on another OS will probably be fine.

@yzhou216
Copy link
Contributor Author

[[ $(qman --version) =~ "1.5.0" ]] && echo "matches"

Sounds good, I'm going to spend some time and see if I can reproduce this problem, if so I'll open an issue with regard to versionCheckHook.

@kpbaks
Copy link
Contributor

kpbaks commented Sep 10, 2025

I think we can merge it as it is now, and then in the future extend it with a versionCheckHook once the issue with it has been resolved.

@nixpkgs-ci nixpkgs-ci bot added the 8.has: package (new) This PR adds a new package label Jan 26, 2026
@lovelymono
Copy link
Contributor

Can be updated to 1.5.1 while we're at it.

@yzhou216 yzhou216 requested a review from Defelo March 3, 2026 01:15
@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Mar 3, 2026
@Adda0 Adda0 mentioned this pull request Mar 5, 2026
13 tasks
@lilyball
Copy link
Member

lilyball commented Mar 7, 2026

I ended up submitting essentially a duplicate of this at #496407, but I've got some tweaks you don't have. I'm working on tweaking my derivation to account for the differences between yours and mine, I'll have that ready to propose soon.

@lilyball
Copy link
Member

lilyball commented Mar 7, 2026

I've also figured out the versionCheckHook problem, it looks like qman crashes if the TERM env var isn't present.

@lilyball
Copy link
Member

lilyball commented Mar 7, 2026

I just updated #496407 to account for the differences between my original version and this PR. My updated version is similar to this PR except it uses versionCheckHook, it properly spits out the test dependencies, it removes the installed sample config file (because it would be non-editable and so its presence breaks the ability to use /etc/xdg/qman/qman.conf and also changes some of the settings away from the documented defaults), it uses /usr/bin/open on darwin instead of using xdg-utils, and it also puts the correct paths into the manpage instead of claiming to be using /run/current-system/sw/bin. I skipped editing doc/TROUBLESHOOTING.md as the /usr/bin references there are just example configuration values. I also skipped setting propagatedUserEnvPkgs as this PR does since the default config values are absolute paths rather than relying on PATH. I also added the two maintainers from this PR into my version.

If you like my changes, it doesn't matter to me whether you copy them into this PR or close it in favor of my PR (though if you copy it into this one you should remember to update the PR title for the version update). If you disagree with any of the changes just let me know.

@yzhou216
Copy link
Contributor Author

yzhou216 commented Mar 8, 2026

I ended up submitting essentially a duplicate of this at #496407, but I've got some tweaks you don't have. I'm working on tweaking my derivation to account for the differences between yours and mine, I'll have that ready to propose soon.

Great work!

@lilyball
Copy link
Member

lilyball commented Mar 10, 2026

I resubmitted my version of this as a PR against your branch as requested: yzhou216#2. BTW don't forget to fix the title of this PR!

@yzhou216 yzhou216 changed the title qman: init at 1.5.0 qman: init at 1.5.1 Mar 10, 2026
@yzhou216
Copy link
Contributor Author

@lilyball Is propagatedUserEnvPkgs still needed for this?

@yzhou216
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 434438
Commit: 57ff75382665ef4dbf5f580e6c519ffdd7617145 (subsequent changes)
Merge: f003c6a86b0a8cbee6c664fe686b7fb1f26ba600

Logs: https://github.com/yzhou216/nixpkgs-review-gha/actions/runs/22924867279

Download packages from cache:
  • x86_64-linux
    nix-store -r --add-root nixpkgs-pr-434438-x86_64-linux \
      --option binary-caches 'https://cache.nixos.org/ https://yzhou216.cachix.org' \
      --option trusted-public-keys '
      cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
      yzhou216.cachix.org-1:O7nGwQnLGGBGE8zYFMipVzPVN956FcV57y9SqwEP+O8=
      ' \
      /nix/store/higickkqy6m3ivwm9dgkg1a0b9q6g0sd-qman-1.5.1
  • aarch64-linux
    nix-store -r --add-root nixpkgs-pr-434438-aarch64-linux \
      --option binary-caches 'https://cache.nixos.org/ https://yzhou216.cachix.org' \
      --option trusted-public-keys '
      cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
      yzhou216.cachix.org-1:O7nGwQnLGGBGE8zYFMipVzPVN956FcV57y9SqwEP+O8=
      ' \
      /nix/store/0zp4r69myvx6my58m5igdk9r0j2g08fp-qman-1.5.1
  • x86_64-darwin
    nix-store -r --add-root nixpkgs-pr-434438-x86_64-darwin \
      --option binary-caches 'https://cache.nixos.org/ https://yzhou216.cachix.org' \
      --option trusted-public-keys '
      cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
      yzhou216.cachix.org-1:O7nGwQnLGGBGE8zYFMipVzPVN956FcV57y9SqwEP+O8=
      ' \
      /nix/store/vripi293i6qcb90h81i72pmng81b81qn-qman-1.5.1
  • aarch64-darwin
    nix-store -r --add-root nixpkgs-pr-434438-aarch64-darwin \
      --option binary-caches 'https://cache.nixos.org/ https://yzhou216.cachix.org' \
      --option trusted-public-keys '
      cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
      yzhou216.cachix.org-1:O7nGwQnLGGBGE8zYFMipVzPVN956FcV57y9SqwEP+O8=
      ' \
      /nix/store/x94qsyn88cygaszxpqj682jjqaj562kd-qman-1.5.1

x86_64-linux

✅ 1 package built:
  • qman

aarch64-linux

✅ 1 package built:
  • qman

x86_64-darwin (sandbox = true)

✅ 1 package built:
  • qman

aarch64-darwin (sandbox = true)

✅ 1 package built:
  • qman

@lilyball
Copy link
Member

I don't believe it was ever necessary? AFAICT qman invokes all these tools via configured paths, defaulting to absolute paths. Certainly it seems to work fine for me without it.

Co-authored-by: Lily Ballard <lily@ballards.net>
@yzhou216
Copy link
Contributor Author

I don't believe it was ever necessary? AFAICT qman invokes all these tools via configured paths, defaulting to absolute paths. Certainly it seems to work fine for me without it.

It fails in a pure shell:

$ nix-shell --pure -A qman
$ ./result/bin/qman
'apropos .' failed; did you run mandb/makewhatis?

Should we add it back or is there another way to do this?

@lilyball
Copy link
Member

It fails in a pure shell

So does using nix-shell --pure -p man and running apropos .. Similarly, running env -i TERM="$TERM" PATH="$PATH" result/bin/qman still fails, which means it's not the PATH var that matters. I don't know enough about mandb to know what's going on, the only env vars listed in the man page for apropos are things I don't have set.

@lilyball
Copy link
Member

Ah hah it's the $HOME env var. env -i TERM="$TERM" HOME="$HOME" PATH="$PATH" result/bin/qman works. Trying to do this in nix-shell --pure will just never work because it overrides PATH, which apropos uses to synthesize MANPATH if it's not otherwise set.

Copy link
Member

@lilyball lilyball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is now semantically identical to what I proposed, so I'm happy with it.

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants