Skip to content

Documentation: style guide for use of with #292468

@lolbinarycat

Description

@lolbinarycat

Problem

i see a lot of license = with licenses; [ mit ] in PRs recently.

compared to the simpler license = licenses.mit, this is both longer and more syntactically complex, taking longer to read for humans, and possibly longer to evaluate too.

Proposal

this should be avoided for single-license packages (which is most of them).

this would not apply to meta.maintainers, for the following reason:

  • it is more likely to have multiple values
  • it is much more likely to have extra values added in the future.
  • maintainers is plural, which implies a list

i would be willing to write this into pkgs/README.md but i'm not going to open a PR until i've gotten some feedback, it wouldn't make sense for me to single-handedly decide what the best practice is.


Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: best practicesDocumentation and discussion around best practices for Nixpkgs development9.needs: community feedbackThis needs feedback from more community members.9.needs: documentationThis needs to be documented well.
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions