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

doc/by-name: 2 small manual transition improvements #342621

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
22 changes: 20 additions & 2 deletions pkgs/by-name/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,29 @@ if package maintainers would like to use this feature, they are welcome to migra
To lessen PR traffic, they're encouraged to also perform some more general maintenance on the package in the same PR,
though this is not required and must not be expected.

Note that definitions in `all-packages.nix` with custom arguments should not be removed.
Note that `callPackage` definitions in `all-packages.nix` with custom arguments should not be removed.
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`.
Such packages may still be moved to `pkgs/by-name` however, in order to avoid the slightly superficial choice of directory / category in which the `default.nix` file was placed, but please keep the definition in `all-packages.nix` using `callPackage`.
See also [changing implicit attribute defaults](#changing-implicit-attribute-defaults).

However, definitions like the following, can be transitioned:

```
# all-packages.nix
fooWithBaz = foo.override {
bar = baz;
};
# turned into pkgs/by-name/fo/fooWithBaz/package.nix with:
{
foo,
baz,
}:

foo.override {
bar = baz;
}
```

## Limitations

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