nixpkgs/pkgs/by-name
Masum Reza c8201d6eef
Merge pull request #323091 from r-ryantm/auto-update/home-manager
home-manager: 0-unstable-2024-06-22 -> 0-unstable-2024-06-26
2024-06-28 16:12:05 +05:30
..
_0/_0xpropo
_2/_2ship2harkinian
_4
_6/_64gram
_9/_9base
a4/a4
a5/a52dec
aa
ab
ac
ad ad-miner: 1.4.0 -> 1.5.0 2024-06-22 19:55:44 +00:00
ae
af
ag
ai
al Merge pull request #316727 from jpds/nixos-tests-prometheus 2024-06-23 23:05:06 +02:00
am
an Merge pull request #319987 from r-ryantm/auto-update/anytype 2024-06-26 00:46:47 +02:00
ao/aocl-utils
ap api-linter: 1.66.1 -> 1.66.2 2024-06-28 00:23:45 +00:00
ar arc-browser: 1.47.1-50893 -> 1.48.2-51225 2024-06-24 23:51:10 +03:00
as
at Merge pull request #320334 from GetPsyched/atlauncher-version-bump 2024-06-24 11:05:57 +02:00
au auto-changelog: move out of node-packages 2024-06-26 00:40:10 -04:00
av
aw
ax
ay
az/azurite azurite: init at 3.31.0 2024-06-25 07:52:34 +02:00
ba
bc bcachefs-tools: Fix cross 2024-06-25 22:39:23 +03:00
bd
be bevelbar: 23.08 -> 24.06 2024-06-27 23:43:24 +00:00
bi bilibili: 1.13.5-2 -> 1.13.6-2 2024-06-24 19:07:15 +00:00
bk/bk
bl Merge pull request #319287 from TomaSajt/blockbench 2024-06-21 23:01:55 +08:00
bm/bmake
bn/bngblaster
bo Merge pull request #322116 from r-ryantm/auto-update/bombsquad 2024-06-25 00:53:55 -06:00
bp
bq/bqn
br
bs
bt
bu
by
c-
c2 c2patool: 0.9.3 -> 0.9.4 2024-06-26 00:29:10 +00:00
ca Merge pull request #321273 from r-ryantm/auto-update/cargo-swift 2024-06-27 23:57:53 +02:00
cb
cc
cd Merge pull request #321656 from r-ryantm/auto-update/cdecl 2024-06-28 00:00:32 +02:00
ce centrifugo: 5.4.0 -> 5.4.1 2024-06-24 04:56:34 +00:00
cg
ch chrysalis: remove unneeded rec 2024-06-24 12:21:02 -04:00
ci Merge pull request #319822 from marijanp/add-cinzel 2024-06-26 01:09:42 +02:00
cl clipcat: 0.18.0 -> 0.18.1 2024-06-26 16:00:32 +00:00
cm
cn/cntb
co Merge pull request #318156 from r-ryantm/auto-update/codeium 2024-06-28 01:13:56 +02:00
cp cppcheck: 2.14.1 -> 2.14.2 2024-06-26 22:05:13 +02:00
cr crunchy-cli: 3.6.6 -> 3.6.7 2024-06-25 16:58:47 +00:00
cs Merge pull request #191191 from arikgrahl/css-checker 2024-06-25 20:37:43 +02:00
ct/ctx
cu cue: 0.9.1 -> 0.9.2 2024-06-26 15:57:48 +00:00
cv/cvemap cvemap: 0.0.6 -> 0.0.7 2024-06-26 00:37:03 +00:00
cy
cz/czkawka
da
db dbgate: 5.3.0 -> 5.3.1 2024-06-22 11:27:42 +02:00
dc/dc3dd
dd
de devenv: remove drupol from maintainers 2024-06-24 09:14:00 +02:00
dg/dgoss
dh/dhcpig
di diagnostic-languageserver: remove from node-packages 2024-06-26 00:52:20 -04:00
dj/djent
dm
dn
do dotenv-cli: init 2024-06-26 00:51:16 -04:00
dp
dr
ds
dt Merge pull request #309331 from Yarny0/dtv-scan-tables-update 2024-06-26 01:06:53 +02:00
du
dv/dvb-apps
dx
dy dynamodb-local: 2.5.1 -> 2.5.2 2024-06-20 21:53:04 +00:00
e1/e1s
ea
eb
ec
ed
ee/eepers
ef/efibootmgr efibootmgr: adopt; modernize (#319159) 2024-06-22 03:29:49 +03:00
ei
ej/ejsonkms
ek/eksctl eksctl: 0.182.0 -> 0.183.0 2024-06-20 08:42:53 +00:00
el
em emote: add aleksana as maintainer 2024-06-20 20:54:21 +08:00
en maintainers: drop lheckemann 2024-06-21 15:54:54 +02:00
ep
er
es
et
eu
ev
ew/eww
ex
ey/eyewitness
ez/eza eza: 0.18.19 -> 0.18.20 2024-06-27 06:28:07 +02:00
fa Merge pull request #321793 from r-ryantm/auto-update/fastfetch 2024-06-22 20:29:49 +00:00
fb/fbset
fc catppuccin-fcitx5: merge with fcitx5-catppuccin 2024-06-19 20:56:13 +02:00
fe fennel-ls: 0.1.2 -> 0.1.3 2024-06-27 10:58:34 +02:00
ff
fg/fgqcanvas
fi firefoxpwa: add libraries for audio and video support 2024-06-27 12:26:05 -07:00
fj/fjo
fl Merge pull request #322391 from r-ryantm/auto-update/flarectl 2024-06-25 17:19:00 +00:00
fm
fn/fnott
fo
fr frankenphp: 1.2.0 -> 1.2.1 2024-06-25 13:40:34 +00:00
fs
ft/fte
fu furmark: add an icon 2024-06-19 16:46:56 +02:00
fv
fw/fwupd
fx/fx fx: migrate to by-name 2024-06-27 23:00:51 +04:00
fy/fypp
fz fzf-make: 0.34.0 -> 0.35.0 2024-06-25 23:01:08 +00:00
g3/g3kb-switch
ga gamescope: 3.14.18 -> 3.14.22 2024-06-22 07:56:52 +03:00
gb
gc
gd
ge get-graphql-schema: Move out of nodePackages 2024-06-26 00:39:39 -04:00
gf
gg/gg
gh gh-gei: init at 1.7.1 2024-06-22 04:50:47 -04:00
gi git-instafix: 0.2.4 -> 0.2.5 2024-06-26 16:12:14 +00:00
gl
gm
gn Merge pull request #320801 from Aleksanaa/gnome-feeds 2024-06-22 14:33:45 +08:00
go Merge pull request #321168 from r-ryantm/auto-update/gosmee 2024-06-20 10:53:34 +02:00
gp gpt4all: remove drupol from maintainers 2024-06-24 09:13:52 +02:00
gr Merge pull request #315488 from r-ryantm/auto-update/grype 2024-06-26 13:07:51 +00:00
gt
gu
gv/gvisor
gx/gxml
h8/h8mail
ha handlr-regex: 0.10.0 -> 0.10.1 2024-06-26 15:52:12 -04:00
hb/hb-honeypot
hd
he hermitcli: 0.39.2 -> 0.39.3 2024-06-21 13:07:39 +00:00
hi hifile: 0.9.9.12 -> 0.9.9.13 2024-06-21 20:53:40 +02:00
hj/hjson-go
hn/hn-text
ho home-manager: 0-unstable-2024-06-22 -> 0-unstable-2024-06-26 2024-06-28 05:10:54 +00:00
ht
hu hugo: 0.127.0 -> 0.128.0 2024-06-26 01:11:49 +00:00
hv/hvm bend: 0.2.22 -> 0.2.34, hvm: 2.0.17 -> 2.0.19 2024-06-21 18:41:48 -07:00
hy Merge pull request #321888 from rossabaker/hyperlink-0.1.32 2024-06-28 01:03:05 +08:00
i2/i2p
i3
ia
ic ice-bar: init at 0.9.0 (#317971) 2024-06-20 12:02:45 +02:00
id
if/ifrextractor-rs
ig igir: 2.7.0 -> 2.8.2 2024-06-27 11:20:38 +00:00
ii
ij/ijhttp
im imposm: 0.12.0 -> 0.13.2 2024-06-20 13:33:00 +00:00
in Merge pull request #297056 from arikgrahl/ingress2gateway 2024-06-25 20:40:10 +02:00
io/ioq3-scion
ip
ir
is/iscc
it Merge pull request #315797 from amyipdev/itools 2024-06-20 10:25:28 +02:00
iw/iw
iz/izrss
ja jan: remove drupol from maintainers 2024-06-24 09:13:43 +02:00
jd/jdt-language-server
je jellyfin-web: 10.9.6 -> 10.9.7 2024-06-27 10:02:33 +02:00
ji
jj/jj
jn
jo
jq/jq-zsh-plugin
jr/jrl-cmakemodules
js/jsoncons
jt/jtdx
ju
jw/jwasm
ka karmor: 1.2.2 -> 1.2.3 2024-06-24 13:28:49 +00:00
kc Merge pull request #317827 from selfuryon/chore/kcl-refactor 2024-06-26 22:07:06 +02:00
kd
ke Merge pull request #264430 from Compile-Time/master 2024-06-22 20:39:48 +05:30
kg/kgeotag
ki kitex: 0.10.0 -> 0.10.1 2024-06-24 13:27:45 +00:00
kl/klog-time-tracker
km
kn knossosnet: 1.1.0 -> 1.2.0 2024-06-22 13:56:13 +00:00
ko Merge pull request #322389 from r-ryantm/auto-update/kor 2024-06-25 16:52:22 -04:00
kp/kplex
kr
ks
kt
ku kubectl-validate: 0.0.3 -> 0.0.4 2024-06-21 16:15:53 +02:00
kx
ky
la lazysql: 0.1.8 -> 0.2.1 2024-06-24 03:02:41 +00:00
lb
lc
ld
le Merge pull request #318408 from r-ryantm/auto-update/leetgo 2024-06-28 01:38:01 +02:00
lg/lgogdownloader lgogdownloader: move to pkgs/by-name 2024-06-27 03:01:31 +09:00
li Merge pull request #319548 from mksafavi/pkg/livi 2024-06-28 01:06:01 +08:00
lk/lk-jwt-service
ll treewide: use cmakeCudaArchitecturesString 2024-06-23 16:51:31 -07:00
lm
ln/lngen
lo Merge pull request #321219 from matteo-pacini/loopwm 2024-06-27 12:44:02 +02:00
lp
ls
lt/ltris
lu
lw/lwgrp
lx lxd-ui: 0.8.1 -> 0.9 2024-06-20 22:58:13 +00:00
lz
m1/m1ddc
m2
ma Merge pull request #322864 from r-ryantm/auto-update/makejinja 2024-06-27 23:12:27 +02:00
mb
mc Merge pull request #306216 from Tommimon/master 2024-06-26 21:38:03 +02:00
md
me Merge pull request #317955 from r-ryantm/auto-update/mercure 2024-06-28 01:16:46 +02:00
mf
mg
mi miru: darwin support, add maintainer 2024-06-23 21:23:55 +01:00
mk
ml/mlx42
mo Merge pull request #322829 from LudovicoPiero/bump-mongodb-compass 2024-06-27 14:08:08 +02:00
mp
mq
ms msolve: 0.6.5 -> 0.6.6 2024-06-27 11:01:14 +02:00
mu
my mystmd: 1.2.5 -> 1.2.9 2024-06-24 07:11:40 +00:00
n2/n2
n8/n8n n8n: add maintainer gepbird 2024-06-26 19:49:06 +02:00
na Merge pull request #322947 from r-ryantm/auto-update/namespace-cli 2024-06-27 15:50:27 -04:00
nb
nc
nd/ndstrim
ne Merge pull request #321970 from r-ryantm/auto-update/nezha-agent 2024-06-23 14:53:49 +00:00
nf
ng
nh
ni Merge pull request #256230 from SomeoneSerge/feat/gpu-tests-py 2024-06-26 19:16:53 +00:00
nl
nm/nmap-parse
nn/nncp
no Merge pull request #318718 from msanft/notary/0.6.1-unstable 2024-06-25 13:01:12 +02:00
np npm-lockfile-fix: add meta.homepage 2024-06-22 14:40:02 +02:00
nr nrr: 0.9.2 -> 0.9.3 2024-06-25 16:14:12 +00:00
ns
nt/ntfs2btrfs
nu nuclei-templates: 9.8.9 -> 9.9.0 2024-06-25 16:29:00 +00:00
nv
nw
nx/nxengine-evo
oa
ob
oc
od odoo: 17.0.20240507 -> 17.0.20240616 2024-06-19 13:35:22 +00:00
oe/oelint-adv oelint-adv: 5.6.0 -> 5.7.0 2024-06-27 06:54:57 +00:00
of
oh
oi maintainers: remove alva (#322371) 2024-06-25 16:00:55 +02:00
ok/okolors
ol ollama: 0.1.45 -> 0.1.47 2024-06-27 14:43:46 -04:00
om omnictl: 0.37.5 -> 0.38.1 2024-06-22 08:52:30 +00:00
on
oo/oo7 oo7: add meta.changelog 2024-06-19 17:48:42 -04:00
op Merge pull request #322481 from r-ryantm/auto-update/openvas-scanner 2024-06-26 20:19:36 +02:00
or orchard: 0.19.1 -> 0.20.0 2024-06-27 05:06:20 +00:00
os
ot
ou
ov
ow
pa Merge pull request #320563 from sikmir/paho-mqtt-cpp 2024-06-26 21:58:07 +04:00
pc/pcsx2
pd Merge pull request #322252 from rnhmjoj/pr-pdns-recursor 2024-06-25 08:28:03 +02:00
pe pegtl: init at 3.2.7 2024-06-26 13:22:00 +04:00
pf/pfft
pg pgraphs: 0.6.12 -> 0.6.13 2024-06-27 10:49:27 +02:00
ph phpdocumentor: 3.5.0 -> 3.5.2 2024-06-28 00:02:12 +00:00
pi pinact: 0.2.0 -> 0.2.1 2024-06-26 17:03:38 +00:00
pk
pl
pm
pn
po Merge pull request #322839 from fabaff/poutine-bump 2024-06-27 13:59:50 +02:00
pp/ppsspp
pq
pr Merge pull request #321851 from getchoo/pkgs/prismlauncher/8.4 2024-06-28 01:47:41 +02:00
ps/ps_mem
pt ptyxis: 46.2 -> 46.3 2024-06-20 00:07:36 +08:00
pu
pv/pvsneslib
pw
px/pxder
py Merge pull request #316805 from Moraxyc/add-pywal16 2024-06-27 13:52:23 +02:00
pz/pzip
qa/qadwaitadecorations
qc/qcm
qd qdrant-web-ui: 0.1.28 -> 0.1.29 2024-06-22 02:43:01 +00:00
qg/qgrep
qp/qpoases
qr
qs
qt/qtractor
qu Merge pull request #321653 from Frontear/update-quickemu 2024-06-24 14:16:15 +00:00
r0/r0vm
r1/r10k
ra Merge pull request #321580 from gador/radicle-httpd 2024-06-25 16:25:06 +02:00
rc rclip: 1.10.0 -> 1.10.1 2024-06-23 18:27:54 +00:00
rd/rdwatool
re Merge pull request #322197 from r-ryantm/auto-update/renode-unstable 2024-06-27 23:44:24 +02:00
rh/rHttp
ri
rk
rl/rl_json
rm
rn/rnd-name
ro roddhjav-apparmor-rules: 0-unstable-2024-06-16 -> 0-unstable-2024-06-27 2024-06-27 10:54:50 +00:00
rp/rpcs3
rq rquickshare: 0.7.1 -> 0.8.2 2024-06-20 12:15:30 +09:00
rs
rt rtorrent: use multiple outputs, update documentation 2024-06-26 11:06:04 -03:00
ru Merge pull request #322474 from anas-contribs/rustmission 2024-06-26 12:02:31 +00:00
rw/rwpspread
ry ryujinx: 1.1.1330 -> 1.1.1336 2024-06-19 21:19:55 +00:00
s0/s0ix-selftest-tool
s3
sa Merge pull request #321231 from pinpox/update-satty-0.13.0 2024-06-20 16:37:15 -04:00
sb/sbom-utility
sc scion-apps: init at unstable-2024-04-05 2024-06-27 11:52:34 +02:00
sd
se sendme: 0.9.0 -> 0.10.0 2024-06-27 15:14:55 +00:00
sf/sfwbar sfwbar: 1.0_beta14 -> 1.0_beta15 2024-06-24 10:38:18 +02:00
sg/sgfutils
sh
si
sk
sl
sm Merge pull request #320821 from lpchaim/init-smartcat 2024-06-22 19:58:12 +00:00
sn snipe-it: 6.4.2 -> 7.0.4 2024-06-23 12:52:04 +02:00
so solo5: remove unsupported qemu flag in test 2024-06-23 15:35:27 +03:00
sp sploitscan: 0.9.1 -> 0.10.1 2024-06-27 18:10:10 +02:00
sq
sr
ss
st Merge pull request #298407 from gepbird/stylelint-lsp-init 2024-06-25 23:22:14 +02:00
su Merge pull request #307031 from MDM23/update-surrealist 2024-06-26 01:08:47 +02:00
sv Merge pull request #220785 from techknowlogick/svix-cli 2024-06-23 19:44:04 +02:00
sw
sx
sy Merge pull request #322513 from r-ryantm/auto-update/syft 2024-06-26 13:08:47 +00:00
t-/t-rex
ta Merge pull request #321430 from r-ryantm/auto-update/tailscale-nginx-auth 2024-06-21 22:25:42 +02:00
tb/tbump
tc/tcsh
td tdnf: 3.5.6 -> 3.5.7 2024-06-25 02:50:19 +00:00
te televido: 0.3.0 -> 0.4.0 2024-06-25 12:55:17 +02:00
tg Merge pull request #303121 from pacien/tg-archive-init 2024-06-21 00:15:29 +05:30
th Merge pull request #302269 from Tochiaha/thc-secure-delete 2024-06-25 16:07:18 +02:00
ti tinymist: 0.11.11 -> 0.11.12 2024-06-28 07:52:02 +02:00
tk
tl
tm
to toml-sort: init at 0.23.1 2024-06-21 20:18:56 +01:00
tp Merge pull request #321647 from Frontear/update-tpnote 2024-06-27 15:57:48 -04:00
tr Merge pull request #258058 from doronbehar/pkg/transmission_4 2024-06-23 00:07:37 +03:00
tt
tu
tw
tx/txr
ty typstyle: 0.11.27 -> 0.11.28 2024-06-25 16:19:14 +02:00
uc Merge #321435: Revert #320852: Clean up cross bootstrapping 2024-06-21 08:14:02 +02:00
ud
ue
ug
uh/uhttpmock_1_0
ui
um/umpire
un Merge pull request #318312 from r-ryantm/auto-update/unciv 2024-06-28 01:06:19 +02:00
up
us
ut
uu/uuu
uv/uv uv: 0.2.13 -> 0.2.15 2024-06-25 23:29:17 +00:00
uw/uwhoisd
ux uxn: 1.0-unstable-2024-06-14 -> 1.0-unstable-2024-06-15 2024-06-23 00:58:51 +00:00
va vacuum-go: 0.10.0 -> 0.10.1 2024-06-22 15:45:10 +00:00
vc vcpkg: 2024.05.24 -> 2024.06.15 2024-06-26 21:27:36 +00:00
vd/vdhcoapp
ve vencord: 1.8.9 -> 1.9.0 2024-06-21 10:04:31 -04:00
vg/vgm2x
vi victoriametrics: add shawn8901 as maintainer 2024-06-23 20:40:41 +02:00
vk/vkd3d
vl
vm Merge pull request #321521 from Panky-codes/add-vmctl 2024-06-24 18:56:50 +02:00
vn/vndr vndr: migrate to buildGoModule 2024-06-21 10:21:33 +02:00
vo/voidmap
vp
vs/vscode-js-debug
vu
vv/vvvvvv
vz/vzic
wa wayidle: 0.1.1 -> 0.2.0 2024-06-27 00:39:21 +00:00
wb
we werf: 2.6.1 -> 2.6.2 2024-06-25 16:32:00 +00:00
wg/wg-access-server nixos/wg-access-server: init module 2024-06-25 10:59:30 +02:00
wh whatsapp: init at 2.24.11.85 (#321464) 2024-06-22 20:45:31 +05:30
wi wit-bindgen: 0.26.0 -> 0.27.0 2024-06-28 03:17:05 +00:00
wl wlx-overlay-s: 0.4.1 -> 0.4.2 2024-06-23 00:22:28 +00:00
wo
wp
ws wstunnel: 9.7.1 -> 9.7.2 2024-06-26 17:03:34 +02:00
wt wttrbar: 0.10.2 -> 0.10.4 2024-06-21 01:57:55 +00:00
wx/wxc
wy/wyoming-satellite
x1/x16
x5/x509-limbo
xa/xarcan
xc
xd
xe xemu: 0.7.123 -> 0.7.127 2024-06-21 05:24:29 +00:00
xf/xfs-undelete
xh/xhosts
xi xivlauncher: 1.0.8 -> 1.0.9 2024-06-27 21:15:52 +01:00
xl Merge pull request #322367 from iivusly/xld 2024-06-27 12:57:18 +02:00
xm Merge pull request #318266 from katexochen/xmonad-log/mod 2024-06-19 15:55:20 +02:00
xn/xnlinkfinder
xo
xp
xr/xr-hardware
xs
xu/xunit-viewer
xw/xwayland-run
ya yamlscript: 0.1.61 -> 0.1.63 2024-06-21 23:35:03 +00:00
yc/ycmd
yd/ydotool
ye
yg/yggdrasil
yj/yj
yo Merge pull request #277811 from herberteuler/fix/yourkit 2024-06-24 16:04:59 -04:00
ys/ysfx
yt
yu
za
zb/zbus-xmlgen
zc/zcfan
ze zed-editor: 0.137.6 -> 0.141.2 2024-06-27 13:45:07 +02:00
zf/zfind zfind: 0.4.3 -> 0.4.4 2024-06-22 19:36:35 +00:00
zi zitadel: Drop Sorixelle as maintainer 2024-06-21 16:11:10 +02:00
zl/zluda
zm/zmkBATx
zo zoraxy: 3.0.6 -> 3.0.7 2024-06-20 19:23:31 +00:00
zp zpaqfranz: 59.8 -> 59.9 2024-06-26 09:04:29 +00:00
zs Merge pull request #296562 from fidgetingbits/add-zsh-zhooks-plugin 2024-06-21 00:24:07 +05:30
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;
}