nixpkgs/pkgs/by-name
2024-11-13 15:37:25 +00:00
..
_0
_1
_2
_3
_4
_5/_5etools
_6
_7/_7kaa
_9
a2
a4/a4
a5/a52dec
aa
ab ab-av1: 0.7.18 -> 0.7.19 (#354684) 2024-11-09 10:44:50 -05:00
ac
ad ad: init at 0.1.3 (#355006) 2024-11-11 20:43:19 +01:00
ae
af
ag
ah
ai aider-chat: add playwright version (#354796) 2024-11-09 15:35:21 -05:00
aj/aj-snapshot
ak/akira-unstable
al alist: add proxyVendor 2024-11-13 16:02:49 +08:00
am
an
ao/aocl-utils
ap team-list: establish java team 2024-11-09 18:26:59 +00:00
aq aquamarine: 0.4.3 -> 0.4.4 2024-11-10 18:08:52 +00:00
ar
as
at
au audiobookshelf: 2.16.1 -> 2.16.2 (#354188) 2024-11-12 18:42:51 -06:00
av
aw
ax
ay
az azure-storage-azcopy: 10.26.0 -> 10.27.0 2024-11-10 02:30:30 +01:00
b3/b3sum
b4
b6/b612
ba baidupcs-go: 3.9.5 -> 3.9.5-unstable-2024-06-23 2024-11-11 22:07:22 -08:00
bb
bc
bd
be benthos: 4.27.0 -> 4.39.0 2024-11-11 11:10:04 +08:00
bf
bg
bi bitwarden-desktop: fix system authentication (#339384) 2024-11-13 17:12:33 +08:00
bj/bjumblr
bk
bl bleep: 0.0.7 -> 0.0.9 (#346909) 2024-11-12 18:32:50 +01:00
bm
bn/bngblaster
bo bosh-cli: 7.8.0 -> 7.8.2 2024-11-10 02:23:33 +01:00
bp
bq
br brave: darwin support, add darwin maintainer (#352880) 2024-11-13 10:41:19 +01:00
bs bsc: remove axv2 when building on non x86 system (#354473) 2024-11-10 01:52:51 +01:00
bt
bu buildkite-agent: 3.85.1 -> 3.86.0 2024-11-12 10:18:06 -05:00
bv
bw
by
bz/bzrtp
c2
c3
c6/c64-debugger
c-
ca cargo-i18n: fix build with newer versions of Clang 2024-11-12 20:08:06 -05:00
cb cbmp: init at 1.1.1 (#329351) 2024-11-11 14:08:12 +01:00
cc
cd
ce
cf cfn-nag: fix gemfile so that binaries are generated (#353735) 2024-11-10 10:52:55 -06:00
cg
ch choparp: init at 0-unstable-2021-04-23 (#346415) 2024-11-13 12:45:50 +01:00
ci circt: fix build for x86_64-darwin on rosetta (#355368) 2024-11-13 10:28:20 +01:00
cj
ck
cl cloudflare-dynamic-dns: 4.3.5 -> 4.3.9 2024-11-12 12:22:18 +00:00
cm
cn
co codeql: 2.19.1 -> 2.19.3 2024-11-12 10:50:31 +00:00
cp cpm-cmake: Set CURRENT_CPM_VERSION; adopt; format (#354654) 2024-11-12 08:47:12 +01:00
cq/cq
cr crates-tui: init at 0.1.20 (#354307) 2024-11-10 12:12:42 +01:00
cs
ct
cu
cv
cw
cx
cy
cz treewide: remove redundant patches and locks (#354215) 2024-11-09 12:57:37 +00:00
d2 d2: 0.6.7 -> 0.6.8 2024-11-09 23:42:07 +09:00
d-
da dashy-ui: init at 3.1.1-unstable-2024-07-14 (#349149) 2024-11-10 09:35:31 -06:00
db dbmate: 2.21.0 -> 2.22.0 2024-11-10 13:10:04 +00:00
dc
dd
de treewide: use new Darwin SDK pattern on some packages (#355156) 2024-11-12 20:55:45 -08:00
df
dg
dh
di distribution: 3.0.0-beta.1 -> 3.0.0-rc.1 (#354430) 2024-11-12 18:56:02 +11:00
dj
dk
dl
dm
dn
do dooit: 2.2.0 -> 3.0.2 (#354955) 2024-11-11 09:59:25 -06:00
dp
dq
dr
ds
dt
du dufs: 0.42.0 -> 0.43.0 (#355321) 2024-11-12 10:47:22 -05:00
dv
dw
dx
dy
dz/dzen2
e1
e2
ea
eb
ec ecsk: init at 0.9.3 (#351894) 2024-11-12 22:49:01 +08:00
ed
ee/eepers
ef
eg
ei
ej
ek
el
em
en
eo
ep
eq
er erg: 0.6.45 -> 0.6.47 2024-11-09 17:38:17 +00:00
es eslint_d: 14.1.1 -> 14.2.2 2024-11-12 20:08:41 +01:00
et
eu
ev evremap: init at 0-unstable-2024-06-17, nixos/evremap: init module (#352720) 2024-11-12 18:41:51 +01:00
ew
ex
ey
ez
f1
f2
f3/f3
f5/f5_6
fa fastcompmgr: 0.4 -> 0.5 (#355349) 2024-11-12 11:09:22 -05:00
fb
fc fcast-client: correct mainProgram 2024-11-12 11:21:11 -06:00
fd
fe
ff
fg
fh
fi
fj/fjo
fl flat-remix-gnome: 20240721 -> 20240922 2024-11-10 02:07:34 +01:00
fm
fn
fo
fp
fq/fq
fr fritz-exporter: 2.5.0 -> 2.5.1 2024-11-13 15:37:25 +00:00
fs
ft
fu function-runner: 6.2.1 -> 6.3.0 2024-11-12 05:08:47 +00:00
fv
fw
fx
fy
fz fzf: 0.56.0 -> 0.56.2 2024-11-12 15:41:09 +10:00
g1/g15daemon
g2/g203-led
g3/g3kb-switch
g8/g810-led
g9/g933-utils
g-/g-wrap
ga
gb
gc gcsfuse: mark as broken on darwin 2024-11-10 02:14:01 +01:00
gd
ge
gf gfie: init at 4.2 (#321007) 2024-11-12 18:51:49 +01:00
gg
gh gh-dash: 4.7.0 -> 4.7.1 2024-11-09 17:14:18 +00:00
gi gittuf: 0.6.2 -> 0.7.0 2024-11-12 12:09:30 +00:00
gj
gk
gl glfw3: added vulkan support (#354761) 2024-11-10 14:25:33 +01:00
gm
gn gnome-online-accounts: 3.52.0 → 3.52.1 2024-11-09 23:02:07 +08:00
go goxlr-utility: 1.1.1-unstable-2024-08-06 -> 1.1.4 (#352454) 2024-11-13 10:42:27 +01:00
gp
gq maintainers: rename milran to wattmto (#355397) 2024-11-13 16:31:44 +08:00
gr gradle-completion: add update script 2024-11-11 15:17:06 +01:00
gs
gt gtree: 1.10.11 -> 1.10.12 2024-11-10 02:35:22 +01:00
gu guymager: init at 0.8.13 2024-11-12 17:25:07 +01:00
gv gvfs: 1.56.0 → 1.56.1 2024-11-09 23:02:07 +08:00
gw
gx
gy
gz
h2
h5/h5utils
h8/h8mail
ha hatsu: 0.2.2 -> 0.3.0 (#354408) 2024-11-12 18:54:10 +11:00
hb
hc hcxtools: 6.3.4 -> 6.3.5 2024-11-11 14:21:02 +00:00
hd
he helix-gpt: 0.31.0 -> 0.34.0 (#354767) 2024-11-09 10:47:16 -05:00
hf
hh
hi hickory-dns: 0.25.0-alpha.2 -> 0.25.0-alpha.3 (#354793) 2024-11-09 19:33:16 -05:00
hj/hjson-go
hl/hledger-check-fancyassertions
hm
hn
ho
hp
hq/hqplayerd
hr
hs
ht htcondor: 23.10.1 -> 24.1.1 (#353342) 2024-11-10 03:18:08 +01:00
hu
hv/hvm
hw hwatch: 0.3.15 -> 0.3.16 2024-11-10 20:35:27 +00:00
hx/hxtools
hy hyprutils: 0.2.3 -> 0.2.5; hyprlang: let it build on other platforms (#355436) 2024-11-13 08:10:33 +05:30
i2
i3
i8/i810switch
i-/i-dot-ming
ia
ib
ic
id
if
ig
ih/ihp-new
ii
ij
ik
il
im immersed: nixfmt (#354619) 2024-11-13 16:39:08 +08:00
in invidious: move to by-name (#355086) 2024-11-13 12:46:06 +01:00
io
ip xen: fix IPXE sourcing 2024-11-12 21:52:03 +00:00
iq
ir ironwail: 0.7.0 -> 0.8.0 2024-11-11 01:13:00 +01:00
is
it
iu/iucode-tool
iv
iw
ix/ix
iz/izrss
j/j
j4/j4-dmenu-desktop
ja jazz2: 2.9.0 -> 2.9.1 (#353432) 2024-11-11 23:13:27 +01:00
jb
jc
jd
je
jf
jg/jgmenu
jh
ji
jj/jj
jm
jn
jo josm: 19230 → 19253 (#354506) 2024-11-09 21:53:26 +01:00
jp jpilot: init at 2.0.2 (#350040) 2024-11-13 10:24:35 +08:00
jq
jr
js
jt
ju juju: 3.5.3 -> 3.5.4 2024-11-10 02:25:29 +01:00
jw
jx
jy/jython
k0/k0sctl
k2
k3
k4/k40-whisperer
k6/k6
k8
k9/k9s
ka kazumi: 1.4.1 -> 1.4.2 (#354581) 2024-11-12 18:30:50 +01:00
kb
kc
kd
ke
kf/kfilt
kg/kgeotag
kh
ki kine: 0.13.2 -> 0.13.3 2024-11-10 04:34:25 +00:00
kl
km
kn
ko komikku: 1.60.0 -> 1.62.0 2024-11-10 17:53:08 +01:00
kp
kr krabby: 0.2.0 -> 0.2.1 2024-11-09 17:11:12 +00:00
ks
kt
ku kubectl-klock: 0.7.0 -> 0.7.2 2024-11-11 13:22:46 +01:00
kv
kw
kx
ky
l2/l2md
la laravel: 5.8.3 -> 5.9.2 (#354696) 2024-11-09 21:51:15 +01:00
lb
lc
ld ldeep: 1.0.72 -> 1.0.73 2024-11-11 11:56:45 +01:00
le maintainers: add jthulhu 2024-11-11 08:33:54 +01:00
lf/lftp
lg
lh
li guymager: init at 0.8.13 (#278529) 2024-11-13 19:43:40 +11:00
lk
ll
lm
ln lngen: unstable-2023-10-17 -> unstable-2024-10-22 2024-11-11 10:18:36 +08:00
lo localsend: 1.15.4-unstable-2024-10-26 -> 1.16.1 (#353481) 2024-11-12 10:20:14 +08:00
lp lprobe: 0.1.3 -> 0.1.4 2024-11-10 14:37:35 +00:00
lr
ls
lt
lu lua-language-server: clean 2024-11-10 22:27:14 +01:00
lv
lw
lx lxgw-neoxihei: 1.207 -> 1.211 2024-11-12 11:55:07 +00:00
ly
lz
m1
m2
m3/m33-linux
m4
m-/m-cli
ma macmon: init at v0.3.3 (#354348) 2024-11-13 01:27:15 -08:00
mb
mc
md mdbook-variables: init at 0.2.4 2024-11-12 04:26:25 +01:00
me mergiraf: init at 0.2.0 (#354870) 2024-11-13 10:52:48 +01:00
mf
mg
mh/mhddfs
mi Mindustry: fix build on non x86 device (#355174) 2024-11-13 12:57:57 +01:00
mj
mk
ml
mm
mn
mo mongodb-ce: 7.0.14 -> 8.0.3 (#354987) 2024-11-12 08:19:35 +01:00
mp mpb: init at 1.11.1 2024-11-12 11:03:30 +00:00
mq
mr
ms
mt
mu mutmut: Add l0b0 as maintainer 2024-11-11 13:48:37 +13:00
mv
mw/mw
mx
my
n2
n3/n3
n8/n8n
n9
na nanoflann: 1.6.1 -> 1.6.2 (#354423) 2024-11-09 18:23:41 +00:00
nb nbqa: 1.9.0 -> 1.9.1 2024-11-11 08:35:34 +01:00
nc
nd ndstool: 2.1.2 -> 2.3.1 2024-11-12 02:49:10 +00:00
ne treewide: use new Darwin SDK pattern on some packages (#355156) 2024-11-12 20:55:45 -08:00
nf
ng
nh
ni nitrokey-udev-rules: init at 1.0.0 (#352481) 2024-11-11 10:54:55 +01:00
nj/njam
nk
nl
nm
nn
no notonoto: init at 0.0.3 2024-11-10 23:59:21 +03:00
np
nq
nr
ns
nt
nu
nv
nw nwg-drawer: 0.5.0 -> 0.5.2 2024-11-09 21:33:09 +00:00
nx
ny
nz nzportable: init at 2.0.0-indev+20241012190425 (#312424) 2024-11-11 17:13:45 +09:00
oa oauth2-proxy: 7.6.0 -> 7.7.1 2024-11-10 02:26:22 +01:00
ob obsidian: 1.7.5 -> 1.7.6 2024-11-12 16:14:19 +01:00
oc ocrfeeder: fix build 2024-11-12 21:43:41 +08:00
od
oe
of
og
oh
oi oils-for-unix: 0.23.0 -> 0.24.0 2024-11-11 15:42:25 +01:00
ok okteto: 3.0.0 -> 3.1.0 (#354702) 2024-11-09 10:39:12 -05:00
ol
om
on maintainers: rename milran to wattmto (#355397) 2024-11-13 16:31:44 +08:00
oo
op python312Packages.openmm: 8.1.2 -> 8.2.0 (#354739) 2024-11-12 21:17:15 +09:00
oq
or
os
ot
ou
ov ov: 0.36.0 -> 0.37.0 2024-11-09 16:16:30 +00:00
ow
ox ox: switch to the new darwin sdk pattern 2024-11-10 15:46:37 +09:00
p0/p0f
p1/p11-kit
p2/p2pool
p3/p3x-onenote
p4/p4d
p9/p910nd
pa panoply: 5.5.4 -> 5.5.5 2024-11-09 14:29:17 +01:00
pb
pc pcsx2-bin: 2.1.231 -> 2.3.10 (#354542) 2024-11-12 18:28:10 +01:00
pd pdal: 2.8.0 → 2.8.1 2024-11-10 17:20:14 +04:00
pe
pf pflask: pin to python311 2024-11-11 07:04:26 +08:00
pg nixosTests.postgresql: move all postgresql related nixosTests into one folder 2024-11-09 18:24:52 +01:00
ph phash: compilation fixes 2024-11-11 16:03:07 +00:00
pi jpilot: init at 2.0.2 (#350040) 2024-11-13 10:24:35 +08:00
pk
pl plymouth-blahaj-theme: init at 1.0.0 (#348061) 2024-11-12 13:18:20 +01:00
pm pmars,pmars-x11: init at 0.9.4 2024-11-12 20:45:11 +01:00
pn
po pomerium: 0.27.1 -> 0.27.2 (#354989) 2024-11-11 22:36:23 +00:00
pp
pq
pr treewide: use new Darwin SDK pattern on some packages (#355156) 2024-11-12 20:55:45 -08:00
ps
pt ptyxis: 47.2 -> 47.4 2024-11-10 11:21:47 +08:00
pu
pv
pw
px
py pyload-ng: 0.5.0b3.dev85 -> 0.5.0b3.dev87 2024-11-11 11:32:35 +00:00
pz/pzip
q2/q2pro
q-/q-text-as-data
qa
qb
qc
qd
qe
qg
qh/qhull
qm
qn/qnial
qo
qp
qq
qr
qs
qt
qu
qw/qwerty-fr
r0/r0vm
r1
r2
r5/r53-ddns
ra Revert "rav1e: remove build-time dependency on libgit2" 2024-11-12 15:21:38 +00:00
rb
rc
rd
re redlib: 0.35.1-unstable-2024-09-22 -> 0.35.1-unstable-2024-11-01 (#354406) 2024-11-13 19:34:10 +11:00
rf
rg
rh
ri rip2: Add shell completions 2024-11-12 19:48:29 +01:00
rk
rl
rm
rn
ro roboto-flex: init at 3.200 2024-11-10 22:34:09 -03:00
rp rpm-sequoia: fixup darwin build 2024-11-12 14:13:12 -08:00
rq
rr
rs
rt
ru runpodctl: init at 1.14.4 (#300790) 2024-11-13 10:56:00 +08:00
rv/rvvm
rw
rx
ry
rz/rzip
s0/s0ix-selftest-tool
s2
s3
s4/s4cmd
s5
s7/s7
s9/s9fes
s-
sa
sb
sc screenly-cli: 1.0.1 -> 1.0.2 (#355487) 2024-11-13 09:00:29 +00:00
sd
se
sf sfwbar: 1.0_beta15 -> 1.0_beta16 2024-11-11 11:25:29 -03:00
sg
sh
si simple64: 2024.09.1 -> 2024.11.1 2024-11-10 21:33:20 +01:00
sj/sjasmplus
sk skypeforlinux: 8.131.0.202 -> 8.132.0.201 2024-11-12 19:15:58 +00:00
sl slumber: 2.1.0 -> 2.2.0 (#353502) 2024-11-11 08:33:22 -05:00
sm smartcat: 1.7.1 -> 2.1.0 (#354016) 2024-11-11 10:52:18 +01:00
sn
so
sp spotify-player: 0.20.0 -> 0.20.1 2024-11-09 15:07:03 -08:00
sq sqlboiler: 4.16.2 -> 4.17.0 2024-11-10 16:32:13 +00:00
sr
ss
st stirling-pdf: 0.29.0 -> 0.30.1 (#352066) 2024-11-12 19:26:41 +09:00
su superhtml: 0.5.0 -> 0.5.1 (#352539) 2024-11-12 21:07:52 +09:00
sv
sw swapspace: 1.18 -> 1.18.1 2024-11-12 04:07:16 +00:00
sx
sy syshud: 0-unstable-2024-09-26 -> 0-unstable-2024-11-04 (#354422) 2024-11-13 19:38:05 +11:00
sz
t1
t4/t4kcommon
t-/t-rex
ta taterclient-ddnet: 8.6.0 -> 8.6.1 (#355034) 2024-11-12 17:34:19 -06:00
tb
tc
td
te testkube: do not skip check phase 2024-11-10 20:09:22 -05:00
tf
tg
th
ti tigerbeetle: 0.16.8 -> 0.16.12 (#355295) 2024-11-12 14:28:48 -06:00
tk
tl
tm
tn
to
tp
tq/tqsl
tr trimage: migrate to pkgs/by-name (#354864) 2024-11-13 16:37:36 +08:00
ts
tt ttysvr: init at 0.3.3 (#347166) 2024-11-11 13:51:52 +01:00
tu tui-journal: 0.12.0 -> 0.12.1 2024-11-12 08:23:40 +00:00
tv
tw
tx
ty typos: add passthru.tests.version and updateScript (#354982) 2024-11-13 16:33:32 +08:00
tz
u0/u001-font
u2/u2ps
u3/u3-tool
u9/u9fs
u-
ua uair: 0.6.1 -> 0.6.2 2024-11-11 11:32:00 +01:00
ub
uc
ud udev-block-notify: init at 0.7.11 (#327891) 2024-11-11 18:48:51 +08:00
ue
uf
ug
uh
ui
uk/ukmm
ul
um umoria: unpin from gcc-9 2024-11-10 07:48:46 +00:00
un unyaffs: init at 0.9 (#348979) 2024-11-13 17:06:39 +08:00
up upgrade-assistant: init at 0.5.820 (#352011) 2024-11-13 10:45:52 +08:00
uq
ur
us
ut ut: 2.1.0 -> 2.1.1 2024-11-10 23:19:34 +00:00
uu
uv
uw uwsm: 0.20.1 -> 0.20.4 2024-11-12 13:25:55 +00:00
ux
v2
v4/v4l2-relayd
va valkey: 7.2.7 -> 8.0.1 (#347906) 2024-11-13 07:03:55 +02:00
vb
vc vcpkg-tool: use new Darwin SDK pattern 2024-11-11 00:08:45 -08:00
vd
ve
vf/vfkit
vg vgmtrans: init at 1.2, libbassmidi: init at 2.4.15.3 (#321129) 2024-11-10 12:46:00 +01:00
vh
vi vitess: 20.0.2 -> 21.0.0 2024-11-10 02:28:57 +01:00
vk
vl
vm
vn
vo
vp
vr
vs
vt vtsls: init at 0.2.6 (#347284) 2024-11-12 22:13:26 +01:00
vu
vv/vvvvvv
vw
vx/vxl
vy
vz/vzic
w3/w3m
w_
wa waylock: 1.2.1 -> 1.3.0 (#354685) 2024-11-10 10:16:45 -05:00
wb
wc
wd
we weblate: 5.7.2 -> 5.8.1 2024-11-10 16:29:16 +01:00
wf
wg
wh
wi wit-bindgen: 0.33.0 -> 0.34.0 (#354853) 2024-11-10 08:07:59 -05:00
wk/wkhtmltopdf
wl wlink: 0.0.9 -> 0.1.0 2024-11-12 09:25:59 +00:00
wm
wo
wp
wq
wr
ws wstunnel: 10.1.5 -> 10.1.6 (#354648) 2024-11-12 21:57:47 +02:00
wt wttrbar: 0.10.6 -> 0.11.0 2024-11-09 08:05:35 -06:00
wu
wv
ww/wwcd
wx
wy
x1
x2
x3/x3270
x4
x8/x86info
x-/x-create-mouse-void
xa xar: fix Linux build on staging-next (#352507) 2024-11-10 08:44:09 +00:00
xb
xc xcodes: nix-rfc-format 2024-11-10 09:08:36 +00:00
xd
xe xen: 4.19.0 -> 4.19.0-unstable-2024-11-12 2024-11-12 19:14:14 -03:00
xf xf86_input_wacom: 1.2.2 -> 1.2.3 2024-11-10 02:29:52 +01:00
xg
xh
xi
xj
xk
xl
xm xmlcopyeditor: fix darwin build 2024-11-12 00:15:30 +01:00
xn
xo
xp
xq
xr
xs
xt
xu
xv
xw
xx
xy/xylib
xz
ya yaru-theme: 24.04.3 -> 24.10.4 2024-11-10 02:08:17 +01:00
yc/ycmd
yd
ye
yg
yj/yj
yl/yle-dl
ym
yo
yp/ypbind-mt
yq/yq-go
ys/ysfx
yt
yu yutto: 2.0.0-rc.4 -> 2.0.0-rc.5 (#350748) 2024-11-13 17:29:02 +08:00
yx/yx
yy/yyjson
z8/z88dk
z-/z-lua
za zap-chip: split GUI off into zap-chip-gui 2024-11-11 16:22:32 +01:00
zb
zc
zd
ze zed-editor: make node-based built-in LSPs work on NixOS (#354063) 2024-11-10 15:17:48 +01:00
zf
zg
zi zitadel.console: remove mkYarnPackage usage (#341784) 2024-11-13 20:44:02 +11:00
zk
zl
zm
zn
zo
zp
zr/zrepl
zs
zt
zu
zv/zvbi
zw/zwave-js-server
zx
zy/zydis
zz
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;
}