nixpkgs/pkgs/by-name
2024-11-17 08:56:13 -05:00
..
_0/_0xpropo
_4
_6/_64gram
_9/_9base
a4/a4
a5/a52dec
aa
ab ablog: 0.11.8 -> 0.11.10 2024-05-24 07:12:39 +00:00
ac
ad adwaita-icon-theme-legacy: init at 46.2 2024-08-26 14:45:39 +00:00
ae aegisub: fix build on darwin 2024-07-09 08:29:42 +00:00
af
ag Merge pull request #312264 from MatthewCroughan/mc/age-plugin-fido2-hmac 2024-05-19 14:54:33 +08:00
ai
al alt-tab-macos: 6.73.0 -> 7.2.0 2024-11-08 15:46:43 +00:00
am amazon-ssm-agent: 3.3.859.0 -> 3.3.987.0 2024-11-01 18:31:59 +00:00
an antares: fix desktop icon 2024-11-05 19:32:32 +01:00
ao/aocl-utils
ap api-linter: 1.65.2 -> 1.66.0 2024-05-21 01:57:52 +00:00
ar arc-browser: 1.67.0-55463 -> 1.69.0-55816 2024-11-15 13:24:30 +00:00
as asleap: move to by-name 2024-11-05 18:11:46 +00:00
at attic-server: fix faulty meta attrs override for mainProgram 2024-06-11 14:00:23 +00:00
au authentik,authentik-outposts.ldap: 2024.2.2 -> 2024.2.4 2024-07-06 14:56:50 +01:00
av
aw
ax
ay ayatana-indicator-display: init at 24.5.0 2024-06-05 10:53:48 +00:00
az azuki: init at 0-unstable-2021-07-02 2024-10-04 23:44:12 +00:00
ba bashly: 1.1.10 -> 1.2.6 2024-11-12 04:34:53 +00:00
bc bcachefs-tools: 1.9.3 -> 1.9.4 2024-07-22 09:39:12 +05:30
bd/bdf2ttf
be bend: init at 0.2.9 2024-05-20 15:22:37 +05:30
bi bitwarden-desktop: 2024.8.2 -> 2024.9.0 2024-10-07 14:49:11 +02:00
bk/bk
bl blockbench: remove electron version pin 2024-08-27 20:16:26 +00:00
bm/bmake
bn/bngblaster
bo Revert "[Backport release-24.05] boehmgc: disable tests on aarch64-linux" 2024-05-27 09:02:47 +02:00
bp Merge pull request #312682 from luftmensch-luftmensch/bpftop_0.5.1 2024-05-22 14:10:02 +02:00
br brave: 1.71.118 -> 1.71.121 2024-11-01 14:52:07 +00:00
bs
bt
bu [Backport release-24.05] bup: 0.33.3 -> 0.33.4 (#337643) 2024-08-31 12:02:59 +02:00
by
c2 Merge pull request #310003 from ok-nick/c2patool 2024-05-19 13:33:23 +08:00
c-
ca catppuccin-gtk: fix inconsistent theme name 2024-07-03 11:00:18 +00:00
cb
cc
cd
ce centrifugo: 5.4.0 -> 5.4.1 2024-06-25 05:34:34 +00:00
cg
ch chess-clock: 0.6.0 -> 0.6.1 (#344378) 2024-09-30 12:47:46 +00:00
ci
cl
cm
cn/cntb
co consul: 1.18.4 -> 1.18.5 2024-11-02 21:52:32 +00:00
cp cpu-x: add version test 2024-09-04 03:12:46 +00:00
cr create-dmg: init at 1.2.2 2024-08-09 19:39:00 +00:00
cs csvlens: 0.9.0 -> 0.9.1 2024-05-23 00:31:30 +00:00
ct/ctx
cu cups-idprt-sp900: init at 1.4.0 2024-08-22 13:00:35 +00:00
cv/cvemap
cy
cz/czkawka
da darklua: 0.13.0 -> 0.13.1 2024-05-19 00:47:37 +00:00
db dbeaver-bin: add webkitgkt and glib-networking for webbrowser support 2024-09-22 09:56:03 +02:00
dc/dc3dd
dd
de detect-it-easy: init at 3.09 2024-10-22 22:26:37 +00:00
dg/dgoss dgoss: sync with goss 2024-05-31 15:15:38 +00:00
dh/dhcpig
di maintainers: remove ivar 2024-07-05 15:44:35 -04:00
dj/djent
dm
dn/dns2tcp
do dotnet-outdated: 4.6.2 -> 4.6.4 2024-05-20 16:46:01 +00:00
dp
dr/drone-scp
ds
dt
du duckstation-bin: init at 0.1-7294 2024-10-30 09:06:59 +00:00
dv/dvb-apps
dx
dy
e1/e1s
ea easytier: init at 1.2.3 2024-10-02 15:40:40 +00:00
eb
ec
ed
ee/eepers
ei
ej/ejsonkms ejsonkms: init at 0.2.2 2024-06-10 13:53:02 +00:00
ek/eksctl
el
em
en envision: init at 0-unstable-2024-06-25 2024-09-04 11:09:12 -07:00
ep/epub-thumbnailer
er eris-go: 20240128 -> 20240826 2024-08-27 19:08:30 +00:00
es
et
eu
ew/eww
ex exe2hex: init at 1.5.2-unstable-2020-04-27 2024-07-05 22:23:47 +00:00
ez/eza
fa fairywren: init at 0-unstable-2024-06-10 2024-07-06 18:02:41 +00:00
fb/fbset
fc
fe feishin: use electron_31 2024-08-28 15:27:14 +01:00
ff Merge pull request #312578 from r-ryantm/auto-update/ff2mpv-rust 2024-05-18 15:38:11 -04:00
fg/fgqcanvas
fi firefly-iii: 6.1.20 -> 6.1.21 2024-09-29 08:17:04 +00:00
fl flet-client-flutter: pin to flutter 3.19 2024-06-05 18:58:31 +00:00
fm
fn/fnott
fo forgejo: 7.0.10 -> 7.0.11 2024-11-16 19:06:26 +01:00
fr fritz-exporter: 2.5.0 -> 2.5.1 2024-11-14 10:18:02 +00:00
fs
ft/fte
fu furmark: add an icon 2024-09-27 23:04:38 +02:00
fv
fw/fwupd
fy/fypp
fz
g3/g3kb-switch
ga gatus: 5.10.0 -> 5.11.0 2024-05-22 01:18:56 +00:00
gb
gc
ge
gf
gg/gg
gh gh-eco: added fetchpatch; modernize 2024-05-27 19:16:45 +00:00
gi gitlab-timelogs: init at 0.3.0 2024-08-30 14:55:10 +00:00
gl glasskube: 0.11.0 -> 0.13.0 2024-07-17 23:47:01 +00:00
gm gmic: 3.3.5 -> 3.3.6 2024-05-20 19:49:29 +00:00
gn
go google-chrome: 130.0.6723.91 -> 131.0.6778.69 2024-11-13 09:00:44 +00:00
gp
gr gruvbox-gtk-theme: 0-unstable-2023-05-28 -> 0-unstable-2024-06-27 2024-07-10 17:12:50 +10:00
gt
gu guymager: init at 0.8.13 2024-11-13 08:44:17 +00:00
gv/gvisor gvisor: fix ldconfig path 2024-05-19 09:07:31 +02:00
gx/gxml
h8/h8mail
ha haredo: enable cross compilation 2024-05-21 17:13:14 -03:00
hb/hb-honeypot
hd hdr10plus_tool: 1.6.0 -> 1.6.1 2024-09-17 02:46:41 +00:00
he
hi
hj/hjson-go
hn/hn-text hn-text: init at 0.1.4 2024-06-15 17:55:29 +00:00
ho home-manager: 0-unstable-2024-05-12 -> 0-unstable-2024-05-17 2024-05-19 15:05:57 +00:00
ht htcondor: 23.4.0 -> 23.7.2 2024-05-22 01:19:10 +00:00
hu
hy hypre: init at 2.31.0 2024-07-16 15:20:07 +00:00
i2/i2p i2p: 2.5.1 -> 2.6.1 2024-08-26 06:40:53 +02:00
i3
ia
ic Merge pull request #313283 from r-ryantm/auto-update/icewm 2024-05-21 21:49:09 +00:00
id
if/ifrextractor-rs
ig
ii iina: format with nixfmt-rfc-style 2024-06-08 12:40:11 +02:00
im
in inv-sig-helper: init at 0-unstable-2024-08-17 2024-09-28 19:56:22 +02:00
io/ioq3-scion
ip
ir irrd: 4.4.2 -> 4.4.4; fix build (#319593) 2024-06-13 17:51:37 +02:00
is/iscc
it [Backport release-24.05] itsycal: rfc format; itsycal: add meta.changelog; ityscal: 0.15.3 -> 0.15.4 (#326625) 2024-07-13 11:59:13 +05:30
iz/izrss
ja jan: 0.4.12 -> 0.4.13 2024-05-20 13:19:47 +00:00
jd/jdt-language-server
je jellyfin: 10.9.10 -> 10.9.11 2024-09-12 18:32:05 +00:00
ji
jj/jj
jn
jo job-security: unstable-0-2024-03-24 -> 0-unstable-2024-04-07 2024-06-28 13:03:59 +00:00
jr/jrl-cmakemodules
js/jsoncons
jt/jtdx
ju just: genereate man pages and shell completions dynamically 2024-06-07 13:36:46 +00:00
ka kanidm: require big-parallel for building 2024-08-28 22:28:03 +00:00
kc
kd
ke keycastr: init at 0.9.18 2024-07-09 12:48:24 +02:00
kg/kgeotag
ki kin-openapi: init at 0.128.0 2024-10-29 12:40:20 +00:00
kl/klog-time-tracker
km
kn/knossosnet
ko koboldcpp: 1.76 -> 1.77 2024-11-02 11:23:59 +00:00
kp/kplex
kr
ks
kt
ku Update pkgs/by-name/ku/kube-state-metrics/package.nix 2024-05-28 12:46:47 +00:00
kx
ky
la pkgs: add lazysql 2024-06-16 19:22:44 +00:00
lb
lc
ld/ldproxy
le legcord: 1.0.1 -> 1.0.2 2024-10-20 20:34:46 -05:00
lg/lgogdownloader lgogdownloader: 3.14 -> 3.15 2024-09-27 04:51:31 +00:00
li libguytools: init at 2.1.0 2024-11-13 08:44:17 +00:00
ll llama-cpp: 2901 -> 2953 2024-05-21 14:41:37 +00:00
lm lmstudio: 0.2.22 -> 0.2.24 2024-06-03 19:41:56 +00:00
ln/lngen
lo logiops: 0.3.4 -> 0.3.5 2024-10-03 16:09:36 -04:00
lp
ls lse: init at 4.14nw 2024-05-24 06:59:58 +00:00
lt/ltris
lu lutok: update meta.description 2024-08-02 04:26:39 +00:00
lw/lwgrp
lx lxcfs: 6.0.1 -> 6.0.2 2024-09-24 22:15:01 -04:00
lz
m2
ma [Backport release-24.05] matrix-gtk-theme: init at 0-unstable-2024-07-22 (#329678) 2024-09-27 21:51:13 +03:00
mb
mc Merge pull request #313200 from otavio/auto-update/mcuboot-imgtool 2024-05-21 18:14:49 -04:00
md
me mealie: fix relative path in code handling backup 2024-08-22 14:18:13 +02:00
mf
mg
mi mini-calc: 3.0.0 -> 3.0.1 2024-05-21 08:52:41 +02:00
mk
ml/mlx42
mo mozillavpn: 2.24.0 → 2.24.1 2024-10-04 13:30:30 -07:00
mp
mq
ms
mu mullvad-browser: 13.5.9 -> 14.0 2024-11-16 12:28:35 +00:00
my mysql84: 8.4.2 -> 8.4.3 2024-11-03 17:52:59 +00:00
n2/n2
na nanopb: 0.4.6 -> 0.4.8 2024-06-27 19:14:27 +00:00
nb/nbtscan
nc nc4nix: 0-unstable-2024-03-01 -> 0-unstable-2024-08-01 2024-08-02 10:06:20 +02:00
nd/ndstrim
ne neothesia: install icon 2024-07-11 05:27:06 +00:00
nf
ng
nh
ni nix-unit: 2.18.0 -> 2.18.8 2024-11-08 21:55:59 +00:00
nl
nm/nmap-parse
nn nn: init at 2.0.8-unstable-2024-04-08 2024-07-16 15:20:20 +00:00
no normcap: 0.5.6 -> 0.5.7 2024-05-19 10:20:17 +00:00
np
nr nray: limit platform support 2024-05-22 10:33:20 +02:00
ns
nt/ntfs2btrfs
nu nuclei-templates: 9.8.6 -> 9.8.7 2024-05-24 07:01:30 +00:00
nv
nw
nx/nxengine-evo treewide: remove unused occurence of fetchurl argument 2024-05-20 05:20:23 +02:00
oa oath-toolkit: 2.6.11 -> 2.6.12 2024-10-07 18:59:03 +00:00
ob
oc
oe/oelint-adv oelint-adv: 5.3.2 -> 5.4.0 2024-05-31 14:49:49 +00:00
of offat: 0.17.5 -> 0.18.0 2024-05-20 17:44:41 +00:00
oh
oi oink: 1.3.0 -> 1.3.1 2024-10-13 20:57:15 +00:00
ol ollama: remove rocblas override 2024-06-20 19:56:25 +00:00
om omnictl: 0.35.0 -> 0.35.1 2024-05-19 11:03:36 +00:00
on
op opencommit: init at 3.2.1 2024-11-08 09:06:55 +00:00
or
os
ot
ou
ov ovn: fix ovn trying to create socket in nix store 2024-07-02 11:10:18 +00:00
ow owmods-cli: 0.13.1 -> 0.14.0 2024-05-20 09:53:56 +00:00
pa paper-clip: 5.5 -> 5.5.1 2024-10-23 10:39:23 +00:00
pd pdns-recursor: 5.0.6 -> 5.0.9 2024-10-07 10:29:30 +02:00
pe pegtl: init at 2.3.7 2024-07-22 22:28:29 +04:00
pf/pfft
pg
ph
pi pietrasanta-traceroute: init at 0.0.5-unstable-2023-11-28 (#313400) 2024-05-21 16:12:35 +00:00
pk pkcs11-provider: 0.4 -> 0.5 2024-07-08 01:28:41 +00:00
pl Merge pull request #316477 from NixOS/backport-315960-to-release-24.05 2024-06-01 22:39:05 +02:00
pm
pn
po powerpipe: 0.4.4 -> 1.0.0 2024-11-07 18:40:22 +00:00
pp/ppsspp
pq
pr [Backport release-24.05] borgmatic-exporter: init at 0.2.5 (#329180) 2024-11-10 12:48:13 +01:00
ps/ps_mem
pt
pu pulumi-esc: init at 0.9.0 2024-06-10 21:22:36 -05:00
pv/pvsneslib
pw
px/pxder
py pyprland: 2.3.2 -> 2.3.4 2024-05-27 07:54:09 +00:00
pz/pzip
qa/qadwaitadecorations
qc/qcm
qd/qdirstat
qg/qgrep
qp/qpoases
qq/qq qq: 3.2.12-2024.9.27 -> 3.2.13-2024.10.23 2024-10-27 10:35:16 +00:00
qr qrcp: migrate to by-name 2024-09-04 14:51:05 +00:00
qs
qt/qtractor
qu quickemu: fix Samba shares 2024-07-05 07:44:07 +00:00
r1/r10k
ra raycast: 1.85.0 -> 1.85.2 2024-11-14 22:15:39 +00:00
rc rcu: 2024.001p -> 2024.001q 2024-09-20 13:48:27 +02:00
rd/rdwatool
re redmine: 5.1.3 -> 5.1.4 2024-11-05 20:51:03 +01:00
rh/rHttp
ri ride: add patch to support later electron versions 2024-08-27 20:20:55 +00:00
rk
rl/rl_json
rm
rn/rnd-name
ro roddhjav-apparmor-rules: 0-unstable-2024-06-11 -> 0-unstable-2024-06-12 2024-06-15 06:28:08 +00:00
rp/rpcs3
rq rquickshare: 0.7.1 -> 0.8.2 2024-06-21 18:37:53 +00:00
rs rsgain: 3.5 -> 3.5.1 2024-06-08 17:04:19 +00:00
rt
ru [Backport release-24.05] rustdesk-flutter: 1.3.1 -> 1.3.2 (#352520) 2024-10-31 15:51:14 +01:00
rw/rwpspread
ry ryujinx: archive.org tarball mirror for release-24.05 2024-10-05 20:54:03 +02:00
s0/s0ix-selftest-tool s0ix-selftest-tool: 0-unstable-2024-02-07 -> 0-unstable-2024-05-16 2024-05-20 21:49:59 +00:00
s3
sa samrewritten: change platforms to only x86_64-linux 2024-05-27 21:00:51 +00:00
sb/sbom-utility
sc scrcpy: 2.6.1 -> 2.7 2024-09-21 10:39:42 -06:00
sd
se searxng: fix answerers 2024-06-12 14:00:07 +00:00
sg/sgfutils sgfutils: fix build on darwin 2024-05-29 08:42:42 +00:00
sh share-preview: fix build on darwin 2024-05-24 06:49:23 +00:00
si simplex-chat-desktop: 6.0.3 -> 6.0.4 2024-09-09 20:29:32 +00:00
sk skypeforlinux: 8.131.0.202 -> 8.132.0.201 2024-11-13 07:48:49 +00:00
sl slskd: disable flaky test 2024-10-07 02:54:31 +00:00
sm smtp4dev: init at 3.3.4 Fix style and refs 2024-09-26 13:04:40 +00:00
sn snipe-it: 7.0.11 -> 7.0.12 2024-09-23 14:32:48 +02:00
so
sp spice-autorandr: add all linux platforms 2024-07-20 19:16:38 +00:00
sq sqlmc: 1.0.0 -> 1.1.0 2024-05-21 12:23:53 +00:00
sr
ss
st stats: 2.11.14 -> 2.11.16 2024-10-28 13:15:39 +00:00
su
sv
sw switcheroo: add missing imagemagick dependency 2024-08-03 17:04:33 +00:00
sx
sy syft: 1.4.1 -> 1.5.0 2024-05-29 13:05:49 +00:00
t-/t-rex
ta tailscale: 1.76.3 -> 1.76.6 2024-11-07 05:46:26 +00:00
tc/tcsh
td
te teams-for-linux: electron 30 -> electron 32 2024-10-27 13:10:41 -05:00
tg tg-archive: init at 1.1.3 2024-06-20 18:46:29 +00:00
th
ti
tk
tl tlrc: fix build on darwin 2024-08-16 12:28:02 +00:00
tm/tmuxifier
to tor-browser: 14.0 -> 14.0.1 2024-10-30 16:10:18 +00:00
tp
tr tracker-miners: fix store permissions 2024-07-24 19:55:08 +00:00
tt
tu turtle: 0.8 -> 0.9 2024-07-07 07:58:27 +00:00
tw twitch-dl: 2.3.0 -> 2.3.1 2024-05-19 13:04:12 +02:00
tx/txr
ty typstyle: 0.11.21 -> 0.11.22 2024-05-21 09:57:05 +02:00
uc
ud
ue
ug
uh/uhttpmock_1_0
ui
um/umpire
un unbound: apply patch for CVE-2024-8508 2024-10-07 21:21:47 +02:00
up
us usage: init at 0.3.1 2024-09-29 07:23:39 +00:00
ut
uu/uuu
uv/uv uv: 0.1.44 -> 0.1.45 2024-05-20 22:36:08 +00:00
uw uwsm: pass python-bin meson option 2024-09-16 12:31:11 +00:00
ux
va valkey: 7.2.6 -> 7.2.7 2024-10-04 17:43:40 +02:00
vc
vd/vdhcoapp
ve vencord: 1.10.5 -> 1.10.6 2024-11-06 21:09:15 +01:00
vf/vfkit vfkit: init at 0.5.1 2024-09-08 15:14:28 +00:00
vg/vgm2x
vi villain: 2.1.0 -> 2.2.0 2024-09-17 04:14:34 +00:00
vl vlc: 3.0.20 -> 3.0.21, add maintainer 2024-06-15 07:43:31 +00:00
vn/vnote vnote: move to pkgs/by-name 2024-07-05 20:07:11 +00:00
vo voms: move to pkgs/by-name 2024-07-07 17:10:34 +08:00
vp/vpp vpp: init at 24.06 2024-10-13 01:12:43 +00:00
vu vunnel: 0.23.0 -> 0.23.2 2024-05-25 07:01:56 +00:00
vv/vvvvvv
wa warp-terminal: 0.2024.10.29.08.02.stable_02 -> 0.2024.11.12.08.02.stable_02 2024-11-15 16:35:10 +00:00
wb
we webcord: 4.9.2 -> 4.10.2 2024-11-05 19:12:22 +00:00
wh
wi win-disk-writer: init at 1.3 2024-06-02 17:58:37 +00:00
wl wl-kbptr: init at 0.2.1 2024-05-20 22:50:13 +02:00
wo workout-tracker: fix npmDepsHash 2024-09-17 19:01:19 +04:00
wp
ws
wt
wy/wyoming-satellite
x1/x16
x5/x509-limbo
xa/xarcan
xc xcbeautify: 1.4.0 -> 2.4.1 2024-07-15 06:09:46 +00:00
xd
xe xeol: limit platform support 2024-05-22 11:27:12 +02:00
xf/xfs-undelete
xh/xhosts
xi xivlauncher 1.1.0 -> 1.1.1 2024-11-15 09:53:16 +00:00
xl/xlights
xm
xn/xnlinkfinder
xo xonsh: expose unwrapped 2024-06-09 22:13:29 +00:00
xp xplr: 0.21.8 -> 0.21.9 2024-06-17 17:08:36 +00:00
xr/xr-hardware
xs
xu/xunit-viewer xunit-viewer: Add basic tests 2024-06-16 14:27:44 +00:00
xw/xwayland-run
ya maintainers: remove ivar 2024-07-05 15:44:35 -04:00
yc/ycmd
yd/ydotool
ye
yg/yggdrasil yggdrasil: 0.5.7 -> 0.5.9 2024-10-22 16:13:01 +00:00
yj/yj
yo youtrack: use jdk21 2024-06-22 10:38:38 +02:00
ys/ysfx
yt ytmdesktop: 2.0.5 -> 2.0.6 2024-11-05 19:40:45 +01:00
yu
za
zb/zbus-xmlgen
zc/zcfan
ze/zesarux [nixos-24.05] zed-editor: remove package 2024-08-22 18:48:52 +02:00
zi zitadel: add CVE-2024-41952 to knownVulnerabilities 2024-08-28 00:14:38 +01:00
zl/zluda
zo/zola
zp zpaqfranz: 59.4 -> 59.6 2024-05-21 23:49:39 +00:00
zs zsh-zhooks: fix version, refactor 2024-07-06 16:49:51 +02:00
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;
}