Skip to content

treewide: add meta.mainProgram to many packages#171602

Merged
lovesegfault merged 3 commits intoNixOS:masterfrom
malob:treewide-mainProgram
May 6, 2022
Merged

treewide: add meta.mainProgram to many packages#171602
lovesegfault merged 3 commits intoNixOS:masterfrom
malob:treewide-mainProgram

Conversation

@malob
Copy link
Copy Markdown
Member

@malob malob commented May 5, 2022

Description of changes

Following on from my efforts in #166865, I refined my hacky script and I've been able to find an additional 167 packages that provide a single binary whose name differs from the package's name in nixpkgs (or the package's pname) and so don't work with nix run.

The mainProgram additions in 16e15fa should be pretty boring and uncontroversial.

I separated out additions of mainProgram to files located in pkgs/development/libraries/ into a separate commit (9e4be53) since a lot of these required more judgement. I think it makes sense for many of these packages to include a mainProgram as they often provide a single binary utility as part of the package that folks might want to use. However, in some cases it's pretty marginal. For those cases, I looked into the functionality of the binary and what it's used for, and made a judgment call. (I did err on the side of adding mainProgram in a lot of the marginal cases since it does little to no harm, but there were many cases where I left it off since it made no sense.)

Finally I made separate commit for nimble-unwrapped (d8da6a1) since I added a new meta attribute set since it was missing entirely.

I've gone through these changes pretty carefully, but a couple more skims for others is probably in order as a sanity check.

(While I was at it, I also ended up tweaking the order of the meta attributes to my understanding of which order is best practice, as well as updating some of the homepages and adding some when they were missing.)

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

malob added 2 commits May 4, 2022 18:08
where a single bin is provided and someone might actually want to run it
@malob malob requested a review from IvarWithoutBones as a code owner May 5, 2022 02:25
@malob malob requested a review from a user May 5, 2022 02:25
@github-actions github-actions bot added the 6.topic: nim Nim programing language label May 5, 2022
@siraben
Copy link
Copy Markdown
Member

siraben commented May 5, 2022

Result of nixpkgs-review pr 171602 run on aarch64-darwin 1

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels May 5, 2022
@malob
Copy link
Copy Markdown
Member Author

malob commented May 6, 2022

Result of nixpkgs-review pr 171602 run on aarch64-darwin 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nim Nim programing language 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants