Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkgs/by-name: Add manual migration guidelines #254632

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions pkgs/by-name/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,22 @@ libfoo = callPackage ../by-name/so/some-package/package.nix {
};
```

## Manual migration guidelines

Most packages are still defined in `all-packages.nix` and the [category hierarchy](../README.md#category-hierarchy).
Please hold off migrating your maintained packages to this directory.

1. An automated migration for the majority of packages [is being worked on](https://github.com/NixOS/nixpkgs/pull/211832).
In order to save on contributor and reviewer time, packages should only be migrated manually afterwards if they couldn't be migrated automatically.

1. Manual migrations should only be lightly encouraged if the relevant code is being worked on anyways.
For example with a package update or refactoring.

1. Manual migrations should not remove definitions from `all-packages.nix` with custom arguments.
That is a backwards-incompatible change because it changes the `.override` interface.
Such packages may still be moved to `pkgs/by-name` however, while keeping the definition in `all-packages.nix`.
See also [changing implicit attribute defaults](#changing-implicit-attribute-defaults).

## Limitations

There's some limitations as to which packages can be defined using this structure:
Expand Down