Skip to content

Overview of package customisation #731

Open
@zmitchell

Description

@zmitchell

Project description

It's very common to want to tweak a particular feature of an existing package. For example, you may want a package compiled with different options. You may want this modified package used just for your build, or you may want this modified package used throughout the entire dependency tree. There's a variety of mechanisms available that are appropriate in different contexts.

  • Overlays
  • overrideAttrs
  • Modifying derivation phase scripts
  • Applying patches
  • Any others?

This tutorial could take a package from Nixpkgs and try to modify one of its dependencies. The tutorial should show how to achieve the same modification (where possible or reasonable) using different mechanisms, clearly illustrating the tradeoffs or when one mechanism makes more sense over another.

Steps

  • Submit a PR with a draft of the tutorial
    • Only work on this for about an hour before submitting something.
    • It's good to get early feedback so that you don't spend time on a tutorial that's going in a less than ideal direction.

Considerations

It will probably be difficult, if not impossible, to find one modification that can be made using all of the mechanisms listed above. In that situation I would prefer that multiple modifications be used as examples rather than try to use override mechanisms that don't make sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    guideTopics for a new guides

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions