diff --git a/pkgs/by-name/README.md b/pkgs/by-name/README.md index 61496fcfc48d..5eb121b4f3f0 100644 --- a/pkgs/by-name/README.md +++ b/pkgs/by-name/README.md @@ -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). +Definitions like the following however, _can_ be transitioned: + +```nix +# 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: diff --git a/pkgs/by-name/la/lammps-mpi/package.nix b/pkgs/by-name/la/lammps-mpi/package.nix new file mode 100644 index 000000000000..1ac2e6a8bcb2 --- /dev/null +++ b/pkgs/by-name/la/lammps-mpi/package.nix @@ -0,0 +1,13 @@ +{ + lammps, + mpi, + lowPrio, +}: + +lowPrio ( + lammps.override { + extraBuildInputs = [ + mpi + ]; + } +) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 678b4e90182a..1f5ebfb6f0ad 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36543,12 +36543,6 @@ with pkgs; dl-poly-classic-mpi = callPackage ../applications/science/molecular-dynamics/dl-poly-classic { }; - lammps-mpi = lowPrio (lammps.override { - extraBuildInputs = [ - mpi - ]; - }); - gromacs = callPackage ../applications/science/molecular-dynamics/gromacs { singlePrec = true; fftw = fftwSinglePrec;