depot/third_party/nixpkgs/pkgs/by-name
Default email b5f92a349c Project import generated by Copybara.
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
2023-10-19 15:55:26 +02:00
..
_4/_4th Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
_9/_9base Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
a4/a4 Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
aa/aarch64-esr-decoder Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ac/action-validator Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
af/afterstep Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ai/airscan Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
al Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ao/aocl-utils Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ar Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
as Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
aw/aws-azure-login Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ba Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
be Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
bi Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
bm/bmake Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
bo Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
br/bruno Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ca Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
cb/cbmbasic Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
cd Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ce/celluloid Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ci Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
cl Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
cn/cntb Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
co Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
cp/cpu-x Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
cr/create-react-app Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ct/ctx Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
de/debianutils Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
di/dialog Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
dj/djent Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
dm/dmenu-bluetooth Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
do Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
dx Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
dy/dyalog Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ec Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ek/eksctl Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
el/elvish Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
en/engage Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
es/esbuild-config Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
eu/eudev Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ez/eza Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
fl/fleng Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
fm/fm-tune Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
fo/fortune-kind Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
fr/freecell-solver Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ga Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
gb/gbar Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ge Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
gh Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
gi Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
gm/gmic Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
go Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
gr/grimblast Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
gu Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ha Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
he Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
hy Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
i3/i3bar-river Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ic/icewm Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
if/ifrextractor-rs Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
im Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
in Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ir/ironbar Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ji/jinja2-cli Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ju/justbuild Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ka/katriawm Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ke/kermit-terminal Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
kt/ktfmt Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ku/kubectl-neat Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
la/labwc Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
le Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
li Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
lu/luastatus Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
lx/lxd-to-incus Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ma Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
me/mermaid-cli Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
mf/mfoc-hardnested Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
mi Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
mk/mksh Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ml/mlx42 Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
mo/modern-cpp-kafka Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
n2/n2 Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
na/nawk Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ne Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
nf/nfft Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ni Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
nl/nls Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
no/notion Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ns/nsxiv Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
nu/nuget Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
oc/octorpki Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
oe/oelint-adv Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
op/openpgl Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
or/orchard Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ou/outputcheck Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
pa/passes Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
pd/pdepend Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
pe Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ph/phpdocumentor Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
pi Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
pl/platformsh Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
po/poethepoet Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
pp/ppsspp Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
pr Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
px/pxder Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
py/pyp Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
qu Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ra Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
rc/rc Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
re Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ri Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ro Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
rs Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ru Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
sa/samrewritten Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
sc Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
se Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
sh Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
si Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
sl Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
sm/smallwm Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
so/sound-of-sorting Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
sp Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ss/sssnake Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
st/static-server Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
su Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
sw/swipe-guess Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
sy Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
tc/tcsh Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
th Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ti Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
tm/tmuxifier Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
tr Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
tu Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
tx/txr Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
uc Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ud Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ui Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
un Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
up Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ux/uxn Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
ve Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
vi/virtio-win Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
wa Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
wb/wb32-dfu-updater Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
wi/windowmaker Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
wo/wonderdraft Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
xm/xmldiff Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
xo/xorriso Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
xs/xscreensaver Project import generated by Copybara. 2023-10-19 15:55:26 +02:00
ye/yeahwm Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
yt/ytui-music Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
zc/zcfan Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
zi/zitadel Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
zp/zpaqfranz Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
zx/zxpy Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
README.md Project import generated by Copybara. 2023-10-09 21:29:22 +02:00

Name-based package directories

The structure of this directory maps almost directly to top-level package attributes. This is the recommended way to add new top-level packages to Nixpkgs when possible.

Packages found in the named-based structure do not need to be explicitly added to the top-level/all-packages.nix file unless they require overriding the default value of an implicit attribute (see below).

Example

The top-level package pkgs.some-package may be declared by setting up this file structure:

pkgs
└── by-name
   ├── so
   ┊  ├── some-package
      ┊  └── package.nix

Where some-package is the package name and so is the lowercased 2-letter prefix of the package name.

The package.nix may look like this:

# A function taking an attribute set as an argument
{
  # Get access to top-level attributes for use as dependencies
  lib,
  stdenv,
  libbar,

  # Make this derivation configurable using `.override { enableBar = true }`
  enableBar ? false,
}:

# The return value must be a derivation
stdenv.mkDerivation {
  # ...
  buildInputs =
    lib.optional enableBar libbar;
}

You can also split up the package definition into more files in the same directory if necessary.

Once defined, the package can be built from the Nixpkgs root directory using:

nix-build -A some-package

See the general package conventions for more information on package definitions.

Changing implicit attribute defaults

The above expression is called using these arguments by default:

{
  lib = pkgs.lib;
  stdenv = pkgs.stdenv;
  libbar = pkgs.libbar;
}

But the package might need pkgs.libbar_2 instead. While the function could be changed to take libbar_2 directly as an argument, this would change the .override interface, breaking code like .override { libbar = ...; }. So instead it is preferable to use the same generic parameter name libbar and override its value in pkgs/top-level/all-packages.nix:

libfoo = callPackage ../by-name/so/some-package/package.nix {
  libbar = libbar_2;
};

Manual migration guidelines

Most packages are still defined in all-packages.nix and the 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. In order to save on contributor and reviewer time, packages should only be migrated manually afterwards if they couldn't be migrated automatically.

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

  3. 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.

Limitations

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

  • Only packages defined using pkgs.callPackage. This excludes packages defined using pkgs.python3Packages.callPackage ....

    Instead use the category hierarchy for such attributes.

  • Only top-level packages. This excludes packages for other package sets like pkgs.pythonPackages.*.

    Refer to the definition and documentation of the respective package set to figure out how such packages can be declared.

Validation

CI performs certain checks on the pkgs/by-name structure. This is done using the nixpkgs-check-by-name tool. The version of this tool used is the one that corresponds to the NixOS channel of the PR base branch. See here for details.

The tool can be run locally using

nix-build -A tests.nixpkgs-check-by-name
result/bin/nixpkgs-check-by-name .