haskellPackages: add mechanism to add meta.mainProgram #171895
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
Continuing on my personal mini-crusade to get
nix run
working with more packages innixpkgs
(e.g., #171863). I've added a mechanism to easily addmeta.mainProgram
to packages inhaskellPackages
.I then use this to add
meta.mainProgram
to all Haskell packages available forx86_64-darwin
andaarch64-darwin
that provide a single binary where the name of that binary doesn't match the package'sname
orpname
. Some of the binaries provided aren't really that relevant to anyone who would be usingnix run
, e.g., some libraries provide a binary calledexample
. I elected to leave these in since I don't think it does any harm, and reviewing all the binaries individually would be a ton of work, and greatly increase the cost of maintaining this list. (Right now I can update the list by running a script and pasting the output into the file, then sorting it.)I'm not super well versed in the
nixpkgs
Haskell ecosystem, so this should definitely be properly reviewed by someone who does before merging to ensure there aren't any bad/unintended consequences.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes