nixpkgs/pkgs/by-name
2024-11-13 03:03:02 +01:00
..
_0
_1
_2/_2ship2harkinian
_4
_6/_64gram
_9
a4/a4
a5/a52dec
aa
ab
ac actionlint: 1.7.3 -> 1.7.4 (#353847) 2024-11-06 10:00:35 +01:00
ad
ae
af
ag
ai
al
am
an
ao/aocl-utils
ap
aq/aquamarine
ar argo-expr: init at 1.1.3 2024-11-06 11:22:45 +13:00
as asleap: move to by-name 2024-11-04 19:33:27 -06:00
at atkinson-monolegible: init at 0-unstable-2023-02-27 (#353666) 2024-11-06 01:09:05 +01:00
au
av
aw aws-assume-role: fix build (#353643) 2024-11-06 00:23:46 +01:00
ax
ay
az
b3/b3sum
ba bant: 0.1.7 -> 0.1.8 (#353646) 2024-11-06 00:24:10 +01:00
bc
bd
be berry: fix darwin build 2024-11-05 13:50:13 -06:00
bi
bk/bk
bl
bm
bn/bngblaster
bo
bp
bq/bqn
br bruno: switch to apple-sdk_11 2024-11-04 16:27:05 -06:00
bs
bt
bu
by
c2
c3/c3-lsp
c-
ca
cb
cc cctools: set Darwin team as maintainers 2024-11-04 23:01:25 +00:00
cd
ce
cf
cg
ch
ci
cj/cjs
cl clairvoyant: 3.1.7 -> 3.1.8 (#352683) 2024-11-05 21:58:40 +01:00
cm
cn
co cosmic-wallpapers: 1.0.0-alpha.2 -> 1.0.0-alpha.3 (#352701) 2024-11-05 23:44:33 -08:00
cp
cq/cq
cr
cs
ct
cu
cv/cvemap
cw/cwe-client-cli
cy
cz/czkawka
da
db
dc
dd
de detect-it-easy: 3.09 -> 3.10 (#353539) 2024-11-05 06:35:46 +11:00
dg
dh/dhcpig
di dialect: 2.4.2 -> 2.5.0 (#353294) 2024-11-05 05:42:41 +01:00
dj/djent
dm
dn
do
dp
dq/dq
dr
ds
dt
du dua: 2.29.2 -> 2.29.4 (#353603) 2024-11-06 06:12:29 +01:00
dv
dw
dx
dy
e1/e1s
ea
eb
ec
ed
ee/eepers
ef
eg/eg25-manager
ei
ej
ek
el
em empty-epsilon: 2024.06.20 -> 2024.08.09 (#353008) 2024-11-06 08:05:08 +01:00
en
eo/eog
ep
eq
er erlang-language-platform: init at 2024-07-16 (#332273) 2024-11-05 18:56:36 -05:00
es
et
eu
ev GNOME updates 2024-11-02 (#353154) 2024-11-05 20:39:01 +08:00
ew
ex
ey/eyewitness
ez/eza
f2/f2fs-tools
fa fastfetch: 2.28.0 -> 2.29.0 2024-11-04 17:29:08 +01:00
fb/fbset
fc
fd/fdroidserver
fe
ff
fg/fgqcanvas
fi fish-lsp: init at 1.0.8-1 (#330996) 2024-11-05 08:18:47 +01:00
fj/fjo
fl florist: init at 24.2 (#350193) 2024-11-05 12:07:23 +08:00
fm
fn
fo
fp
fr fritz-exporter: add attrs to relaxed deps 2024-11-04 19:11:23 +01:00
fs
ft
fu
fv
fw/fwupd
fx/fx
fy
fz
g3/g3kb-switch
g-/g-wrap
ga
gb
gc
gd
ge
gf
gg/gg
gh gh-contribs: init at 0.9.0 (#352927) 2024-11-05 21:08:25 +01:00
gi gitopper: init at 0.0.16 (#336510) 2024-11-06 12:24:23 +08:00
gk/gk-cli
gl
gm
gn GNOME updates 2024-11-02 (#353154) 2024-11-05 20:39:01 +08:00
go goreleaser: 2.3.2 -> 2.4.4, drop inactive maintainers (#353835) 2024-11-05 23:48:48 +01:00
gp
gr gruvbox-kvantum: init at 1.1 (#346494) 2024-11-06 10:47:03 +08:00
gs
gt
gu guile-sdl: mark broken on darwin 2024-11-05 15:17:58 +01:00
gv/gvisor
gw/gweled
gx
gz/gzdoom
h2/h2
h5/h5utils
h8/h8mail
ha
hb/hb-honeypot
hc/hclfmt
hd
he
hi
hj/hjson-go
hn/hn-text
ho hof: 0.6.9-beta.1 -> 0.6.9 (#346747) 2024-11-06 02:50:33 +01:00
hp
hr/hred
ht
hu
hv/hvm
hw/hwinfo
hx/hxtools
hy
i2/i2p
i3
ia
ic
id
if
ig
ii
ij
im
in infrastructure-agent: init at 1.57.2 2024-11-05 18:11:22 +00:00
io
ip
ir
is
it
iu/iucode-tool
iv
iw
iz/izrss
j/j
ja
jc/jcli
jd/jdt-language-server
je jellyfin-rpc: init at 1.3.0 (#349628) 2024-11-06 12:22:53 +08:00
ji
jj/jj
jn
jo
jp/jp-zip-codes
jq
jr
js
jt
ju
jw/jwasm
k8
ka kapacitor: 1.7.0 -> 1.7.5 (#344895) 2024-11-04 19:32:59 +01:00
kb/kbld
kc
kd
ke
kg/kgeotag
ki
kl
km
kn
ko
kp/kplex
kr
ks
kt
ku
kv/kvmarwaita
kw/kwok
kx
ky kyverno-chainsaw: 0.2.8 -> 0.2.11 2024-11-05 10:45:49 -06:00
la lazysql: fix incorrect version output (#353654) 2024-11-05 12:28:16 +01:00
lb
lc
ld ld64: set Darwin team as maintainers 2024-11-04 23:01:29 +00:00
le
lg/lgogdownloader
li light: fetch source from gitlab (#344563) 2024-11-06 01:34:23 +01:00
lk/lk-jwt-service
ll
lm
ln/lngen
lo
lp
lr/lrcget
ls lsd: switch to apple-sdk_11 2024-11-05 10:46:53 +10:00
lt/ltris
lu
lv/lv_font_conv
lw
lx
lz
m1/m1ddc
m2
ma mailhog: fix build (#353565) 2024-11-06 00:35:32 +01:00
mb
mc
md
me meteo-qt: init at 3.4 (#343502) 2024-11-06 10:43:53 +08:00
mf
mg
mi mimir: 2.14.0 -> 2.14.1 (#353644) 2024-11-05 05:45:31 -05:00
mj/mjmap
mk
ml/mlx42
mm
mo moonlight-qt: refactor darwin support (#352615) 2024-11-05 22:05:18 +01:00
mp
mq
mr/mricron
ms
mt
mu mujoco: 3.2.4 -> 3.2.5 2024-11-05 12:53:22 +01:00
mv/mvt
my
n2/n2
n8/n8n
n9/n98-magerun2
na
nb
nc
nd
ne
nf
ng
nh
ni
nl
nm
nn
no
np
nr
ns
nt
nu
nv
nw
nx/nxengine-evo
ny/nym
nz
oa
ob maintainers: remove ianmjones 2024-11-05 20:47:26 +00:00
oc
od
oe/oelint-adv
of
og/oguri
oh
oi
ok
ol
om
on
oo
op
oq/oqs-provider
or GNOME updates 2024-11-02 (#353154) 2024-11-05 20:39:01 +08:00
os
ot
ou
ov
ow
p3/p3x-onenote
pa
pb/pb
pc
pd
pe
pf
pg
ph
pi pizauth: fix build on darwin 2024-11-05 03:30:33 +08:00
pk
pl plandex-server: add git to path 2024-11-04 13:07:53 -04:00
pm
pn
po postmoogle: 0.9.21 -> 0.9.24 (#351931) 2024-11-05 22:33:08 +01:00
pp/ppsspp
pq
pr
ps
pt
pu
pv
pw
px/pxder
py
pz/pzip
q2/q2pro
qa/qadwaitadecorations
qb/qbittorrent-enhanced
qc/qcm
qd
qe/qemu_xen
qg
qm
qn/qnial
qo/qodem
qp/qpoases
qq/qq
qr
qs
qt
qu
qw/qwerty-fr
r0/r0vm
r1/r10k
ra raycast: 1.84.10 -> 1.84.12 2024-11-05 13:03:08 +00:00
rc
rd/rdwatool
re redmine: 5.1.3 -> 5.1.4 (#353555) 2024-11-04 16:47:35 -05:00
rf/rfdump
rh
ri rime-japanese: init at 0-unstable-2023-08-02 (#295849) 2024-11-05 12:27:34 +01:00
rk
rl/rl_json
rm
rn
ro
rp rpiboot: add updateScript (#351604) 2024-11-06 00:06:56 +02:00
rq
rr/rrdtool
rs
rt
ru
rw/rwpspread
rx/rxvt
ry
s0/s0ix-selftest-tool
s3
s7/s7
sa
sb
sc maintainers: remove ianmjones 2024-11-05 20:47:26 +00:00
sd
se
sf
sg/sgfutils
sh
si sidekick: init at 0.6.6 (#353505) 2024-11-06 12:15:57 +08:00
sk
sl
sm
sn maintainers: remove ianmjones (#353908) 2024-11-05 23:51:15 -06:00
so
sp
sq
sr
ss
st structorizer: 3.32-22 -> 3.32-23 (#351701) 2024-11-05 22:22:16 +01:00
su
sv
sw swayosd: 0-unstable-2024-04-15 -> 0.1.0 (#353591) 2024-11-06 00:39:51 +08:00
sx
sy systemd-netlogd: init at 1.4.2 2024-11-05 14:34:33 -05:00
t-/t-rex
ta tailspin: Migrated to by-name. 2024-11-06 02:09:39 +01:00
tb/tbump
tc/tcsh
td
te terragrunt: 0.67.9 -> 0.68.7 2024-11-13 03:03:02 +01:00
tf/tflint
tg
th
ti
tk
tl
tm
to
tp tpm-fido: init at 0-unstable-2024-10-30 (#352282) 2024-11-05 11:33:15 +01:00
tr
ts
tt
tu
tw
tx
ty
u-
ub
uc
ud
ue
ug
uh/uhttpmock_1_0
ui
um/umpire
un
up
ur
us
ut
uu/uuu
uv/uv uv: 0.4.29 -> 0.4.30 2024-11-05 12:43:32 +01:00
uw
ux
va
vc
vd/vdhcoapp
ve veryl: 0.13.1 -> 0.13.2 (#352567) 2024-11-05 12:45:56 +01:00
vf/vfkit
vg
vi
vk
vl
vm
vn
vo
vp
vr/vrcadvert
vs
vt/vt323
vu
vv/vvvvvv
vw/vwsfriend
vy
vz/vzic
wa wakapi: 2.12.1 -> 2.12.2 2024-11-04 22:37:14 +00:00
wb
wc
we weblate: fix build (#353487) 2024-11-05 08:03:52 +01:00
wf/wf-touch
wg
wh
wi
wl
wo
wp
wr
ws
wt
wu/wush
wv
wx/wxc
wy/wyoming-satellite
x1/x16
x4/x4
xa
xc
xd
xe
xf/xfs-undelete
xh/xhosts
xi
xl
xm
xn/xnlinkfinder
xo
xp
xr
xs
xt/xtf
xu/xunit-viewer
xv/xviewer
xw
ya yalc: migrate from nodePackages 2024-11-05 02:45:57 -05:00
yc/ycmd
yd/ydotool
ye
yg
yj/yj
yo
yp/ypbind-mt
ys/ysfx
yt yt-dlp: 2024.10.22 -> 2024.11.4 (#353623) 2024-11-05 01:19:15 +01:00
yu
za
zb/zbus-xmlgen
zc
ze
zf
zi
zl/zluda
zm/zmkBATx
zo
zp
zs
zu
zv/zvbi
zw/zwave-js-server
zx
zy/zydis
zz/zziplib
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 attribute name corresponding to the package, and so is the lowercase 2-letter prefix of the attribute 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. Since it would take a lot of contributor and reviewer time to migrate all packages manually, an automated migration is planned, though it is expected to still take some time to get done. If you're interested in helping out with this effort, please see this ticket.

Since only PRs to packages in pkgs/by-name can be automatically merged, if package maintainers would like to use this feature, they are welcome to migrate their packages to pkgs/by-name. 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 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, 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.

Definitions like the following however, 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:

  • 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-vet tool.

You can locally emulate the CI check using

$ ./ci/nixpkgs-vet.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;
}