nixpkgs/pkgs/by-name
2024-04-15 19:01:01 -05:00
..
4d/4d-minesweeper 4d-minesweeper: Init at 2.0 2024-04-14 01:45:57 +02:00
_0/_0xpropo
_4/_4th
_6/_64gram
_9/_9base
a4/a4
a5/a52dec
aa
ab/aba
ac
ad
ae aegisub: refactor 2024-04-15 19:23:22 -03:00
af
ag/ags
ai
al
am
an
ao/aocl-utils
ap Merge pull request #299239 from anthonyroussel/update/apvlv 2024-04-13 11:13:13 -04:00
ar
as
at athens: 0.13.2 -> 0.13.3 2024-04-15 00:21:06 +00:00
au
av
aw
ax/axmldec
ay ayatana-indicator-messages: Fix desktop parsing 2024-04-14 21:38:40 +02:00
ba
bc/bc-ur
be bepass: fix vendorHash for go1.22 2024-04-14 14:27:49 +09:00
bi
bk/bk
bl
bm/bmake
bn/bngblaster
bo
bp/bpftop
br
bs
bt/bt-migrate
bu Merge pull request #301928 from nevivurn/feat/gomod-workvendor 2024-04-14 21:57:17 +02:00
by
c-
c2
ca cargo-expand: 1.0.82 -> 1.0.84 2024-04-15 12:29:06 +00:00
cb
cc
cd
ce
cg
ch
ci
cl clipcat: 0.16.5 -> 0.16.6 2024-04-14 12:32:48 +00:00
cm
cn/cntb
co
cp
cr crunchy-cli: 3.3.4 -> 3.4.3 2024-04-15 09:09:38 +00:00
cs
ct/ctx
cu
cv/cvemap
cy
cz/czkawka
da
db/dbus-cpp
dc/dc3dd
dd
de
dg/dgoss
dh/dhcpig
di Merge pull request #295938 from dragonginger10/discover-overlay-0.7.0 2024-04-13 18:47:30 +00:00
dj/djent
dm
dn/dns2tcp
do dotslash: 0.3.0 -> 0.4.1 2024-04-15 17:04:52 -05:00
dp/dpp
dr/drone-scp
ds
dt
du
dv/dvb-apps
dx
dy
ea/easyeasm
eb
ec
ed
ei
ek/eksctl
el
em
en
ep/epub-thumbnailer
er
es
et
eu
ex
ez/eza
fa Merge pull request #298667 from anthonyroussel/upgrade/facter 2024-04-15 07:57:08 -05:00
fb/fbset
fc
fe
ff
fi files-cli: 2.12.56 -> 2.13.2 2024-04-15 16:49:17 +00:00
fl Merge pull request #303634 from lucasew/upd-flet-client-flutter-0.21.2 2024-04-13 15:51:48 -03:00
fm
fn/fnott
fo
fr
fs
fu/fuchsia-cursor
fv
fw/fwupd
fy/fypp
fz/fzf-make
g3/g3kb-switch
ga Merge pull request #303785 from K900/gamescope-3.14.3 2024-04-14 20:38:01 +03:00
gb/gbar
gc
ge
gf
gg/gg
gh
gi gickup: 0.10.28 -> 0.10.29 2024-04-15 18:33:59 +02:00
gl
gm
gn
go
gp
gr
gt
gu
gv/gvisor
gx/gxml
h8/h8mail
ha
hd/hdrop
he
hi hifile: 0.9.9.10 -> 0.9.9.11 2024-04-14 23:16:08 +02:00
hj/hjson-go
ho
ht
hu
hy Merge pull request #304106 from IogaMaster/hyprlang 2024-04-15 21:03:37 +08:00
i2/i2p
i3
ia
ic
id
if/ifrextractor-rs
ig
ii
im
in
io/ioq3-scion
ip
ir/ironbar
it
ja
jd/jdt-language-server
je
ji
jj/jj
jn
jo
jr/jrl-cmakemodules jrl-cmakemodules: init at 0-unstable-2024-04-12 2024-04-15 02:43:26 +02:00
js/jsoncons
ju
ka
kc
kd/kdsingleapplication
ke
kg/kgeotag
ki kittysay: init at 0.5.0 2024-04-14 17:38:53 +01:00
kl/klog-time-tracker
km
kn/knossosnet
ko
kp/kplex
kr
ks
kt maintainers: add bonsairobo 2024-04-13 13:30:53 -07:00
ku kubo: 0.27.0 -> 0.28.0 2024-04-15 13:20:22 +00:00
kx/kxstitch
ky/kyverno-chainsaw
la
lb
lc/lcab
ld/ldproxy
le
li Merge pull request #295711 from mksafavi/pkg/livi 2024-04-14 21:18:43 +08:00
ll llama-cpp: 2636 -> 2674 2024-04-14 23:18:05 +00:00
lm/lmstudio
ln/lngen
lo local-ai: 2.12.3 -> 2.12.4 2024-04-14 15:19:43 +00:00
lp
ls
lt/ltris
lu
lw/lwgrp
lx
lz
m2
ma
mb
mc Merge pull request #301928 from nevivurn/feat/gomod-workvendor 2024-04-14 21:57:17 +02:00
md
me
mf
mg/mgitstatus
mi minijinja: 1.0.17 -> 1.0.20 2024-04-14 06:48:32 +00:00
mk
ml/mlx42
mo
mp/mpifileutils
mq
ms
mu
my mystmd: 1.1.52 -> 1.1.53 2024-04-14 05:19:04 +00:00
n2/n2
na
nb/nbtscan
nc
nd/ndstrim
ne
nf/nfft
ng/ngrid
nh
ni Merge pull request #303283 from shivaraj-bh/update-nix-health 2024-04-13 18:27:07 +02:00
nl
nm/nmap-parse
nn/nncp
no
np
nr
ns
nt/ntfs2btrfs
nu
nv
nw
oa
ob
oc
oe/oelint-adv
of
oh/oh-my-fish
oi
ol/olvid
om/omniorbpy
on
op openvas-scanner: init at 23.0.1 2024-04-14 11:18:01 +02:00
or
os
ot
ou
ov
ow
pa pace: init at 0.15.2 2024-04-14 15:05:38 +01:00
pd Merge pull request #298650 from anthonyroussel/update/puppet-lint 2024-04-15 08:12:49 -05:00
pe
pf/pfft
pg
ph
pi pixi: 0.17.1 -> 0.19.1 2024-04-15 13:45:05 +08:00
pk
pl
pm
pn
po poethepoet: 0.25.0 -> 0.25.1 2024-04-15 10:37:28 +00:00
pp/ppsspp
pq
pr
pt
pu Merge pull request #298650 from anthonyroussel/update/puppet-lint 2024-04-15 08:12:49 -05:00
pv/pvsneslib
pw
px/pxder
py
pz/pzip
qa/qadwaitadecorations
qc/qcm
qd/qdirstat
qg/qgrep
qr
qs
qt/qtractor
qu
r1/r10k
ra
rc
rd/rdwatool
re
ri
rk/rkbin
rl/rl_json
rm
rn/rnd-name
ro
rp/rpcs3 rpcs3: 0.0.31-16271-4ecf8ecd0 -> 0.0.31-16334-fba1db29b 2024-04-13 17:56:58 +00:00
rq/rqbit
rs
rt
ru ruapu: init at 0.1.0 2024-04-14 23:32:41 +08:00
rw/rwpspread
ry
s3
sa sarasa-gothic: 1.0.9 -> 1.0.10 2024-04-14 02:29:22 +00:00
sc
sd
se
sg/sgfutils
sh shopware-cli: 0.4.34 -> 0.4.35 2024-04-15 02:35:03 +00:00
si
sl
sm smassh: init at 3.1.3 2024-04-15 14:12:06 +02:00
sn
so
sp spotube: update meta.homepage, format with nixfmt 2024-04-14 22:42:38 +02:00
sq
sr srm-cuarzo: 0.5.5-1 -> 0.5.6-1 2024-04-14 02:31:53 +00:00
ss sssnake: fix darwin build 2024-04-15 10:50:08 +10:00
st
su
sv
sw
sx
sy
t-/t-rex
ta Merge pull request #303911 from SuperSandro2000/tailscalesd 2024-04-15 23:04:49 +02:00
tc/tcsh
td/tdl
te Merge pull request #304004 from r-ryantm/auto-update/tenv 2024-04-14 10:57:28 -04:00
tg/tgpt
th
ti
tk/tkdiff
tl
tm/tmuxifier
to
tp
tr troubadix: init at 24.4.0 2024-04-14 11:59:13 +02:00
tt/ttop
tu
tw/twitch-dl twitch-dl: 2.1.4 -> 2.2.0 2024-04-15 04:20:00 +00:00
tx/txr
ty
uc
ud
ue
ug
ui
um/umpire
un unciv: 4.11.2 -> 4.11.4 2024-04-13 18:35:05 +00:00
up uplosi: 0.1.3 -> 0.2.0 2024-04-15 11:49:05 +02:00
us/usql
ut
uu/uuu
uv/uv
uw/uwhoisd
ux/uxn
va
vc
ve
vg/vgm2x
vi
vl
vu
vv/vvvvvv
wa walker: 0.0.68 -> 0.0.70 2024-04-15 11:34:55 +00:00
wb/wb32-dfu-updater
we
wh
wi
wl
wo
wp/wp-cli
ws
wt/wtfis
wy/wyoming-satellite
x1/x16
x5/x509-limbo
xa/xarcan
xc
xd
xe
xf/xfs-undelete
xi
xm
xo
xp/xplr
xr/xr-hardware
xs
xw/xwayland-run
ya
yc/ycmd
ye
yg/yggdrasil
yj/yj
yo
ys/ysfx
yt
yu
za
zb/zbus-xmlgen
zc/zcfan
ze
zi zitadel: fix vendorHash for go1.22 2024-04-14 14:27:50 +09:00
zl/zluda
zo/zola
zp
zs
zu/zug
zw/zwave-js-server
zx
README.md

Name-based package directories

The structure of this directory maps almost directly to top-level package attributes. Add new top-level packages to Nixpkgs using this mechanism whenever possible.

Packages found in the name-based structure are automatically included, without needing to be added to all-packages.nix. However if the implicit attribute defaults need to be changed for a package, this must still be declared in all-packages.nix.

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:

    • Either change the package definition to work with pkgs.callPackage.
    • Or use the category hierarchy.
  • 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.

You can locally emulate the CI check using

$ ./maintainers/scripts/check-by-name.sh master

See here for more info.

Recommendation for new packages with multiple versions

These checks of the pkgs/by-name structure can cause problems in combination:

  1. New top-level packages using callPackage must be defined via pkgs/by-name.
  2. Packages in pkgs/by-name cannot refer to files outside their own directory.

This means that outside pkgs/by-name, multiple already-present top-level packages can refer to some common file. If you open a PR to another instance of such a package, CI will fail check 1, but if you try to move the package to pkgs/by-name, it will fail check 2.

This is often the case for packages with multiple versions, such as

{
  foo_1 = callPackage ../tools/foo/1.nix { };
  foo_2 = callPackage ../tools/foo/2.nix { };
}

The best way to resolve this is to not use callPackage directly, such that check 1 doesn't trigger. This can be done by using inherit on a local package set:

{
  inherit
    ({
      foo_1 = callPackage ../tools/foo/1.nix { };
      foo_2 = callPackage ../tools/foo/2.nix { };
    })
    foo_1
    foo_2
    ;
}

While this may seem pointless, this can in fact help with future package set refactorings, because it establishes a clear connection between related attributes.

Further possible refactorings

This is not required, but the above solution also allows refactoring the definitions into a separate file:

{
  inherit (import ../tools/foo pkgs)
    foo_1 foo_2;
}
# pkgs/tools/foo/default.nix
pkgs: {
  foo_1 = callPackage ./1.nix { };
  foo_2 = callPackage ./2.nix { };
}

Alternatively using callPackages if callPackage isn't used underneath and you want the same .override arguments for all attributes:

{
  inherit (callPackages ../tools/foo { })
    foo_1 foo_2;
}
# pkgs/tools/foo/default.nix
{
  stdenv
}: {
  foo_1 = stdenv.mkDerivation { /* ... */ };
  foo_2 = stdenv.mkDerivation { /* ... */ };
}

Exposing the package set

This is not required, but the above solution also allows exposing the package set as an attribute:

{
  foo-versions = import ../tools/foo pkgs;
  # Or using callPackages
  # foo-versions = callPackages ../tools/foo { };

  inherit (foo-versions) foo_1 foo_2;
}