nixpkgs/pkgs/by-name
2024-10-19 08:55:11 -04:00
..
_0
_1
_2/_2ship2harkinian
_4
_6/_64gram
_9
a4/a4
a5/a52dec
aa aaphoto: fix src 2024-10-17 19:50:21 +02:00
ab abcmidi: 2024.08.13 -> 2024.10.10 2024-10-16 21:08:32 +00:00
ac
ad adcskiller: init at 0-unstable-2024-05-19 (#344732) 2024-10-11 00:24:06 +02:00
ae aerospace: init at 0.14.2-Beta (#344015) 2024-10-12 11:38:46 +01:00
af
ag
ai aider-chat: 0.57.0 -> 0.59.0 2024-10-11 15:59:42 +08:00
al aldente: 1.28.4 -> 1.28.5 (#348115) 2024-10-19 16:22:13 +08:00
am amdvlk: workaround glslang 14 issue 2024-10-17 11:52:26 +02:00
an anchor: drop xrelkd from maintainer 2024-10-15 23:43:51 +08:00
ao/aocl-utils aocl-utils: apply nixfmt 2024-10-12 11:30:44 +02:00
ap apt: 2.9.7 -> 2.9.8 2024-10-17 13:04:40 +00:00
aq/aquamarine aquamarine: 0.4.1 -> 0.4.3 2024-10-14 16:27:37 +01:00
ar archivemount: 0.9.1 -> 1 (#344990) 2024-10-19 05:21:52 +02:00
as
at nixos/atticd: init module (#347749) 2024-10-14 09:33:35 -04:00
au auto-cpufreq: copy icon to correct location 2024-10-18 14:49:02 +02:00
av
aw treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
ax
ay ayatana-ido: 0.10.3 -> 0.10.4 (#349133) 2024-10-16 22:55:05 +01:00
az azpainter: add darwin bundle 2024-10-15 18:46:24 +04:00
b3/b3sum
ba bash-language-server: only deploy prod dependencies (#349662) 2024-10-19 08:44:01 +02:00
bc bcachefs-tools: 1.11.0 -> 1.13.0 2024-10-11 12:16:49 +02:00
bd
be
bi binsider: 0.1.0 -> 0.2.0 (#348196) 2024-10-19 05:49:03 +03:00
bk/bk
bl bluetui: init at 0.5.1 2024-10-16 22:34:37 +02:00
bm
bn/bngblaster
bo boundary: 0.17.1 -> 0.18.0 2024-10-14 16:19:36 -04:00
bp
bq/bqn
br
bs
bt
bu buf: 1.44.0 -> 1.45.0 2024-10-14 02:06:04 +00:00
by
c-
c2
c3/c3-lsp
ca catppuccin-cursors: 0.3.1 -> 0.4.0 (#348675) 2024-10-19 04:01:31 +02:00
cb
cc ccid: 1.5.5 -> 1.6.1 2024-10-16 20:40:36 +02:00
cd
ce
cf
cg
ch treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
ci cimg: 3.4.2 -> 3.4.3 (#348693) 2024-10-17 00:43:08 +00:00
cj/cjs
cl cliphist: 0.6.0 -> 0.6.1 2024-10-15 19:22:37 -05:00
cm
cn
co cosmic-wallpapers: Adjust license documentation 2024-10-18 15:47:50 -07:00
cp cpplint: 1.7.0 -> 2.0.0 2024-10-11 23:49:34 +02:00
cq/cq
cr crow: init at 1.2 2024-10-13 07:42:53 +02:00
cs csvlens: 0.10.0 -> 0.10.1 2024-10-18 00:35:02 +08:00
ct/ctx
cu
cv/cvemap
cw/cwe-client-cli
cy
cz/czkawka czkawka: add versionCheckHook 2024-10-12 22:03:02 +02:00
da darcs-to-git: 0-unstable-2024-02-20 -> 0-unstable-2024-09-30 (#346980) 2024-10-10 19:17:50 -04:00
db treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
dc
dd
de dependency-track: 4.11.7 -> 4.12.0 (#349255) 2024-10-19 01:54:15 +02:00
dg
dh/dhcpig
di dinit: 0.19.0 -> 0.19.1 2024-10-15 02:36:49 +00:00
dj/djent
dm
dn dnslookup: init at 1.11.1 2024-10-18 14:15:22 -07:00
do treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
dp
dr
ds dsp: fix build with ffmpeg7 2024-10-14 20:41:18 +03:00
dt
du
dv
dw
dx
dy
e1/e1s
ea eask-cli: 0.10.0 -> 0.10.1 2024-10-14 13:50:31 +00:00
eb
ec
ed
ee/eepers
ef
eg/eg25-manager
ei
ej
ek
el
em
en envision: Fix WMR build 2024-10-16 10:12:39 -07:00
eo/eog
ep
er errands: 46.2.5 -> 46.2.6 2024-10-12 10:32:12 +02:00
es espflash: 3.1.1 -> 3.2.0 2024-10-18 12:04:56 +02:00
et
eu eudev.meta.pkgConfigModules: init 2024-10-13 11:49:07 +02:00
ev
ew
ex
ey/eyewitness
ez/eza eza: 0.20.2 -> 0.20.4 2024-10-18 16:08:09 +02:00
f2/f2fs-tools
fa
fb/fbset
fc fceux: 2.6.6-unstable-2024-01-19 -> 2.6.6-unstable-2024-06-09 2024-10-14 22:19:45 -03:00
fd/fdroidserver
fe feather: 2.6.8 -> 2.7.0 (#348504) 2024-10-14 12:19:05 +00:00
ff
fg/fgqcanvas
fi figma-linux: 0.11.4 -> 0.11.5 2024-10-10 18:10:26 -03:00
fj/fjo
fl flexget: 3.11.46 -> 3.11.48 2024-10-17 16:18:07 +02:00
fm
fn/fnott
fo Update pkgs/by-name/fo/foxmarks/package.nix 2024-10-19 10:43:31 +02:00
fr frog-protocols: init at 0.01-unstable-2024-09-25 (#344515) 2024-10-18 21:21:25 +00:00
fs
ft Merge master into staging-next 2024-10-10 12:05:39 +00:00
fu
fv
fw/fwupd
fx/fx
fy
fz
g-/g-wrap
g3/g3kb-switch
ga gat: 0.18.0 -> 0.19.1 2024-10-15 11:54:30 +00:00
gb
gc
gd
ge gerrit: 3.10.1 -> 3.10.2 2024-10-11 22:59:34 +02:00
gf
gg/gg Revert "gg-jj: init at 0.20.0" 2024-10-11 02:25:22 +01:00
gh
gi git-spice: fix x86_64-darwin 2024-10-19 07:03:51 +02:00
gk/gk-cli
gl
gm
gn gnome-graphs: 1.8.1 -> 1.8.2 (#343712) 2024-10-16 11:18:51 +02:00
go u-root{,-cmds}: init; gobusybox: init; mkuimage: init (#344853) 2024-10-18 11:15:43 +02:00
gp gpclient: add gio-networking for embedded browser (#347675) 2024-10-19 05:58:06 +03:00
gr granted: fix wrapping of assume script (#347816) 2024-10-19 05:55:28 +03:00
gs/gscan2pdf
gt
gu
gv/gvisor
gx
gz/gzdoom gzdoom: 4.12.2 -> 4.13.0 2024-10-12 12:33:52 +02:00
h2/h2
h5/h5utils
h8/h8mail
ha halloy: 2024.11 -> 2024.12 (#348090) 2024-10-19 05:04:48 +02:00
hb/hb-honeypot
hc/hclfmt
hd
he treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
hi
hj/hjson-go
hn/hn-text
ho homebank: 5.8.3 -> 5.8.5 2024-10-14 20:45:12 +00:00
hp
hr/hred
ht httpie-desktop: add aarch64-linux support (#343532) 2024-10-19 16:28:52 +08:00
hu
hv/hvm
hw/hwinfo
hx/hxtools
hy hydra: 0-unstable-2024-09-24 -> 0-unstable-2024-10-08 (#347872) 2024-10-13 14:51:07 +02:00
i2/i2p
i3
ia
ic ice-bar: 0.9.0 -> 0.11.9 2024-10-13 15:41:18 +03:00
id ida-free: fix hash mismatchin of icon 2024-10-18 02:34:38 +00:00
if
ig
ii
ij
im Imhex darwin (#330303) 2024-10-18 16:45:36 +02:00
in libcpr: 1.10.5 -> 1.11.0 2024-10-18 08:41:56 +02:00
io
ip
ir
is
it
iu/iucode-tool
iv
iw
iz/izrss
j/j
ja jam: fix OS determination on linux 2024-10-16 10:50:40 -03:00
jc/jcli
jd/jdt-language-server
je
ji
jj/jj
jn
jo Fixing JOE, the fully functional text editor, on macOS (#346118) 2024-10-19 06:17:12 +03:00
jp/jp-zip-codes
jq/jq-zsh-plugin
jr
js
jt/jtdx
ju junest: 7.4.9 -> 7.4.10 2024-10-17 21:30:08 +00:00
jw/jwasm
k8/k8s-manifest-sigstore
ka
kb/kbld
kc kcl: 0.9.8 -> 0.10.0 (#345613) 2024-10-10 10:27:57 +02:00
kd
ke keymapp: 1.3.2 -> 1.3.3 2024-10-16 22:00:26 +02:00
kg/kgeotag treewide: remove qt5.mkDerivation usage (trivial cases) (#348577) 2024-10-18 11:40:19 +02:00
ki kiwitalk: drop 2024-10-17 12:47:53 +09:00
kl
km kmod-blacklist-ubuntu: 30+20230519-1ubuntu3 -> 31+20240202-2ubuntu8 2024-10-11 15:32:17 +02:00
kn knxd: 0.14.61 -> 0.14.63 2024-10-14 15:30:17 +00:00
ko komac: ensure that source is a tag 2024-10-15 23:52:04 -03:00
kp/kplex
kr
ks
kt
ku
kv/kvmarwaita
kw/kwok
kx
ky
la
lb
lc
ld
le legcord: 1.0.0 -> 1.0.1 2024-10-12 14:00:31 -05:00
lg/lgogdownloader
li libguestfs-with-appliance: warn in case of version mismatch 2024-10-19 11:11:42 +02:00
lk/lk-jwt-service
ll
lm lmstudio: 0.3.3 -> 0.3.4 2024-10-13 13:36:17 -05:00
ln/lngen
lo LogSeq: Pin electron 27 until upstream is updated (#347293) 2024-10-19 06:00:02 +03:00
lp
lr/lrcget treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
ls
lt/ltris
lu luakit: hammer 2024-10-13 12:12:05 -03:00
lv/lv_font_conv
lw
lx lxgw-wenkai-screen: 1.330 -> 1.501 2024-10-11 06:03:21 +00:00
lz
m1/m1ddc
m2
ma mactop: 0.1.8 -> 0.1.9 2024-10-19 11:34:03 +09:00
mb
mc
md md-tui: 0.8.6 -> 0.8.7 2024-10-18 17:23:00 +02:00
me megatools: 1.11.0 -> 1.11.1 2024-10-17 08:10:32 +00:00
mf
mg
mi mimir: add adamcstephens to maintainers 2024-10-18 10:11:30 -04:00
mj/mjmap
mk mkuimage: init at 0-unstable-2024-02-28 2024-10-18 09:07:02 +02:00
ml/mlx42 mlx42: 2.3.4 -> 2.4.0 2024-10-16 14:56:31 +00:00
mo moonlight-qt: 6.0.1 -> 6.1.0 2024-10-17 20:11:50 +08:00
mp
mq
mr/mricron
ms
mt mtxclient: move to by-name and reformat 2024-10-11 12:40:38 +02:00
mu mujoco: 3.2.3 -> 3.2.4 2024-10-17 08:51:02 +02:00
my
n2/n2
n8/n8n
n9/n98-magerun2
na nanopb: 0.4.8 -> 0.4.9 (#348727) 2024-10-16 13:34:17 -07:00
nb
nc ncspot: add getchoo as maintainer 2024-10-16 20:00:58 -04:00
nd
ne netbeans: 22 -> 23 (#347614) 2024-10-19 05:58:38 +03:00
nf
ng
nh nheko: move to by-name and reformat 2024-10-11 12:40:39 +02:00
ni nixos-firewall-tool: add nftables support 2024-10-18 20:16:27 +02:00
nl
nm
nn
no nomacs: 3.19.0 -> 3.19.1 2024-10-15 17:24:52 +00:00
np
nr
ns nstool: 1.9.1 -> 1.9.2 2024-10-19 06:23:00 +00:00
nt ntpstat: init at 0.6 2024-10-16 21:32:45 -07:00
nu nufmt: modernize; add update script; unstable-2023-09-25 -> 0-unstable-2024-10-15 (#348627) 2024-10-15 19:17:42 +02:00
nv nvrh: 0.1.12 -> 0.1.13 2024-10-13 17:23:28 +02:00
nw
nx/nxengine-evo
ny/nym
nz nzbget: 24.2 -> 24.3 2024-10-12 16:05:14 -05:00
oa
ob obsidian: 1.6.7 -> 1.7.4 2024-10-16 21:58:05 +02:00
oc
od odin: 0-unstable-2024-08-05 -> 0-unstable-2024-10-12 (#348138) 2024-10-19 06:05:10 +02:00
oe/oelint-adv
of
og/oguri
oh
oi oink: 1.3.0 -> 1.3.1 2024-10-12 23:02:03 -07:00
ok
ol odin: 0-unstable-2024-08-05 -> 0-unstable-2024-10-12 (#348138) 2024-10-19 06:05:10 +02:00
om
on
oo
op open-webui: import missing googleapis-common-protos dep (#342865) 2024-10-17 09:23:22 +02:00
oq/oqs-provider oqs-provider: fix hash for retagged 0.7.0 2024-10-13 16:57:36 -06:00
or
os treewide: remove qt5.mkDerivation usage (trivial cases) (#348577) 2024-10-18 11:40:19 +02:00
ot
ou
ov treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
ow
p3/p3x-onenote
pa
pb/pb
pc pcsx2-bin: 2.1.136 -> 2.1.205 2024-10-14 18:21:34 +01:00
pd pdpmake: 1.4.3 -> 2.0.1 (#349176) 2024-10-17 13:57:47 +00:00
pe pest: 2.34.7 -> 3.3.1 (#347922) 2024-10-13 10:23:27 +02:00
pf
pg pgroll: 0.6.0 -> 0.7.0 2024-10-17 04:20:23 +00:00
ph
pi picom: v12.2 -> v12.3 2024-10-14 18:05:58 +02:00
pk pkarr: init at v2.0.0 2024-10-17 11:18:25 -07:00
pl plex-desktop: remove version from desktop exec 2024-10-14 15:40:17 +02:00
pm
pn
po treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
pp/ppsspp
pq
pr prisma: 5.21.0 -> 5.21.1 2024-10-18 11:54:06 +02:00
ps
pt
pu
pv pv: 1.8.12 -> 1.8.14 2024-10-16 22:37:17 +02:00
pw
px/pxder
py pylyzer: 0.0.66 -> 0.0.67 2024-10-19 11:11:55 +02:00
pz/pzip
qa/qadwaitadecorations
qb/qbittorrent-enhanced
qc/qcm
qd qdirstat: use stdenv.mkDerivation 2024-10-15 08:06:41 +00:00
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 raspberrypi-eeprom: Add flashrom to path (#343718) 2024-10-19 06:06:18 +03:00
rc
rd/rdwatool
re reader: init at 0.4.5 (#344489) 2024-10-19 16:27:35 +08:00
rf/rfdump
rh
ri
rk
rl/rl_json
rm
rn
ro rospo: 0.12.1 -> 0.13.0 2024-10-18 05:19:56 +00:00
rp
rq
rr/rrdtool
rs
rt
ru russ: 0.4.0 -> 0.5.0, move to by-name 2024-10-18 17:02:06 +05:30
rw/rwpspread
rx/rxvt
ry
s0/s0ix-selftest-tool
s3
sa nixos/saunafs: add module + test (#347337) 2024-10-14 09:24:51 +02:00
sb
sc screego: 1.11.0 -> 1.11.1 2024-10-16 23:17:28 +02:00
sd
se setconf: migrate to by-name 2024-10-15 21:52:05 +02:00
sf sfcgal: 1.5.2 -> 2.0.0 2024-10-14 01:51:10 +00:00
sg/sgfutils
sh shadps4: 0.3.0-unstable-2024-10-13 -> 0.3.0-unstable-2024-10-14 2024-10-15 02:43:24 +00:00
si simpleini: init at 4.22 (#346958) 2024-10-19 15:39:59 +08:00
sk
sl
sm
sn snakemake: 8.20.1 -> 8.23.0 (#348616) 2024-10-17 01:18:36 +02:00
so solo5: 0.8.1 -> 0.9.0 2024-10-18 11:15:10 +00:00
sp
sq Use recommended version check 2024-10-17 23:02:52 +08:00
sr
ss ssh-tpm-agent: 0.6.0 -> 0.7.0 2024-10-18 23:31:58 -04:00
st stern: 1.30.0 -> 1.31.0 (#348546) 2024-10-19 05:44:03 +03:00
su supermariowar: Fix GUI applications wrapping (#346941) 2024-10-14 01:38:15 +02:00
sv svdtools: 0.3.18 -> 0.3.19 (#349619) 2024-10-19 05:39:02 +03:00
sw swayimg: 3.2 -> 3.4 (#348242) 2024-10-19 05:00:58 +02:00
sx
sy syncstorage-rs: 0.17.0 -> 0.17.9 (#349507) 2024-10-18 16:05:49 -04:00
t-/t-rex
ta taskflow: 3.7.0 -> 3.8.0 (#348681) 2024-10-17 20:50:02 -07:00
tb/tbump
tc
td tdom: 0.9.4 -> 0.9.5 2024-10-18 06:14:11 +00:00
te technitium-dns-server: 13.0.1 --> 13.0.2 (#347793) 2024-10-19 04:50:03 +02:00
tg
th thrift-ls: 0.2.1 -> 0.2.2 2024-10-18 19:02:36 +00:00
ti tiny-dfr: 0.3.1 -> 0.3.2 2024-10-16 09:06:15 +00:00
tk
tl
tm
to tomato-c: 2023-8-21 → 2024-4-19 (#347360) 2024-10-14 01:44:06 +02:00
tp
tr python3Packages.triton*: 2.1.0 -> 3.0.0 (#328247) 2024-10-16 22:43:07 +00:00
ts
tt ttop: format with nixfmt 2024-10-13 23:22:33 +02:00
tu
tw
tx txr: 295 -> 296 2024-10-15 09:28:22 +00:00
ty typstyle: 0.11.35 -> 0.12.0 2024-10-19 11:12:49 +02:00
u- u-root: add minimal kernel in passthru for local testing 2024-10-18 09:07:02 +02:00
ub
uc
ud
ue
ug
uh/uhttpmock_1_0
ui
um/umpire
un unrar-free: 0.3.0 -> 0.3.1 2024-10-14 05:34:42 +00:00
up
ur
us userborn: 0.2.0 -> 0.3.0 (#347952) 2024-10-12 11:17:23 +02:00
ut
uu/uuu
uv/uv uv: 0.4.11 -> 0.4.20 2024-10-13 17:57:06 +02:00
uw
ux uxplay: fix build on darwin 2024-10-10 11:11:41 +08:00
va
vc
vd/vdhcoapp
ve veryl: add shell completions 2024-10-11 23:51:45 +02:00
vf/vfkit
vg
vi
vk
vl
vm
vn
vo
vp vpl-gpu-rt: 24.2.5 -> 24.3.3 2024-10-15 08:51:10 +00:00
vr/vrcadvert
vs
vt/vt323 vt323: init at 2.0 2024-10-15 10:14:07 +02:00
vu vuls: init at 0.27.0 2024-10-14 14:57:34 +02:00
vv/vvvvvv
vw/vwsfriend
vy/vyxal
vz/vzic
wa warp-terminal: 0.2024.10.08.08.02.stable_02 -> 0.2024.10.15.08.02.stable_02 2024-10-17 22:58:06 +00:00
wb
wc
we weblate: fix version constraints 2024-10-13 17:30:40 +02:00
wf/wf-touch
wg wgpu-utils: 0.16.1 -> 22.1.0, move to pkgs/by-name 2024-10-11 14:39:58 +02:00
wh whoami: init at 1.10.3 2024-10-15 10:50:45 +01:00
wi
wl
wo
wp
wr writefreely: 0.15.0 -> 0.15.1 (#347269) 2024-10-19 04:52:37 +02:00
ws
wt
wu/wush
wv
wx/wxc
wy/wyoming-satellite
x1/x16
x5/x509-limbo
xa
xc
xd
xe
xf/xfs-undelete
xh/xhosts
xi treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
xl
xm
xn/xnlinkfinder
xo
xp
xr
xs
xt/xtf
xu/xunit-viewer
xv/xviewer
xw xwayland-satellite: use binary wrapper 2024-10-16 20:08:39 -04:00
ya
yc/ycmd
yd/ydotool
ye
yg
yj/yj
yo yofi: fix build (#344811) 2024-10-14 15:58:51 +08:00
yp/ypbind-mt
ys/ysfx
yt ytdownloader: 3.18.2 -> 3.18.3 2024-10-11 08:51:36 +00:00
yu yutto: 2.0.0-beta.43 -> 2.0.0-rc.4 2024-10-17 14:40:33 +08:00
za
zb/zbus-xmlgen
zc
ze zed-editor: 0.156.2 -> 0.157.5 2024-10-16 16:30:58 -04:00
zf/zfind
zi
zl/zluda
zm/zmkBATx
zo
zp
zs
zu
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;
}