nixpkgs/pkgs/by-name
superherointj f53970aa44
Merge pull request from DontEatOreo/update-warp-terminal
warp-terminal: 0.2024.04.02.08.02.stable_01 -> 0.2024.04.16.08.02.stable_00
2024-04-20 11:47:02 -03:00
..
_0/_0xpropo _0xpropo: init at 1.000 2024-04-11 01:08:00 -04:00
_4/_4th
_6/_64gram _64gram: 1.1.17 -> 1.1.18 2024-04-19 17:10:26 +05:30
_9/_9base
4d/4d-minesweeper 4d-minesweeper: Init at 2.0 2024-04-14 01:45:57 +02:00
a4/a4
a5/a52dec
aa aaaaxy: 1.5.42 -> 1.5.54 2024-04-09 00:20:53 +00:00
ab/aba
ac
ad
ae Merge pull request from vaci/vaci/aeron-143 2024-04-17 22:24:05 +02:00
af
ag/ags
ai
al
am
an Merge pull request from hatch01/antares 2024-04-17 21:50:06 +02:00
ao/aocl-utils
ap api-linter: 1.65.0 -> 1.65.1 2024-04-18 18:33:29 +00:00
ar Merge pull request from DontEatOreo/pkgs-arc-browser 2024-04-18 17:14:56 +02:00
as ast-grep: 0.20.3 -> 0.20.5 2024-04-13 10:19:49 +00:00
at atac: 0.11.3 -> 0.12.0 2024-04-17 12:21:58 +00:00
au audiness: format with nixfmt 2024-04-12 09:32:42 +02:00
av
aw treewide: replace prefetch-yarn-deps with fixup-yarn-lock where necessary 2024-04-17 13:34:05 -04:00
ax/axmldec
ay ayatana-indicator-messages: Fix desktop parsing 2024-04-14 21:38:40 +02:00
ba bashly: 1.1.1 -> 1.1.10 2024-04-10 15:23:51 +02:00
bc/bc-ur
be Merge pull request from GoldsteinE/betula/1.2 2024-04-20 22:31:38 +08:00
bi Merge pull request from dotlambda/bitwarden 2024-04-16 05:16:09 +00:00
bk/bk
bl
bm/bmake
bn/bngblaster
bo boogie: 3.1.3 -> 3.1.4 2024-04-12 00:32:37 +00:00
bp/bpftop
br bruno: add maintainer gepbird 2024-04-16 00:02:55 +02:00
bs
bt/bt-migrate
bu Merge pull request from nevivurn/feat/gomod-workvendor 2024-04-14 21:57:17 +02:00
by
c2 Merge pull request from ok-nick/c2patool 2024-04-09 14:34:47 +02:00
c-
ca Merge pull request from TheRealKeto/init/castero 2024-04-17 18:40:16 +10:00
cb
cc cc1541: init at 4.1 2024-04-11 15:17:29 +01:00
cd
ce cert-viewer: 0.9.0 -> 0.9.1 2024-04-11 12:02:06 +02:00
cg
ch Merge pull request from jnsgruk/charmcraft 2024-04-17 17:22:10 +02:00
ci ciscoPacketTracer8: small refactor, qol 2024-04-12 14:09:56 -03:00
cl clipcat: 0.16.5 -> 0.16.6 2024-04-14 12:32:48 +00:00
cm
cn/cntb
co Merge pull request from r-ryantm/auto-update/codeium 2024-04-18 21:11:54 +02:00
cp
cr crunchy-cli: 3.3.4 -> 3.4.3 2024-04-15 09:09:38 +00:00
cs
ct/ctx
cu
cv/cvemap
cy cyclonedx-cli: init at 0.25.0 2024-04-15 11:20:56 +02:00
cz/czkawka czkawka: fix darwin build 2024-04-17 10:09:13 +10:00
da
db/dbus-cpp
dc/dc3dd
dd
de treewide: replace prefetch-yarn-deps with fixup-yarn-lock where necessary 2024-04-17 13:34:05 -04:00
dg/dgoss
dh/dhcpig
di Merge pull request from dragonginger10/discover-overlay-0.7.0 2024-04-13 18:47:30 +00:00
dj/djent
dm Merge pull request from jtbx/dlang-2.107.0 2024-04-12 23:27:12 +02:00
dn/dns2tcp
do Merge pull request from aktaboot/init-dogedns 2024-04-20 21:23:12 +08:00
dp/dpp
dr/drone-scp
ds
dt
du
dv/dvb-apps
dx
dy Merge pull request from TomaSajt/dyalog 2024-04-12 08:53:42 +02:00
ea/easyeasm
eb
ec
ed
ei eigenlayer: 0.7.2 -> 0.7.3 2024-04-19 22:37:04 +00:00
ek/eksctl
el elasticsearch-curator: format with nixfmt 2024-04-11 15:24:53 +02:00
em emacs-lsp-booster: 0.2.0 -> 0.2.1 2024-04-17 23:53:33 +00:00
en
ep/epub-thumbnailer
er
es
et etlegacy: fix binaries wrappers 2024-04-09 22:47:07 +02:00
eu
ex
ez/eza Merge pull request from r-ryantm/auto-update/eza 2024-04-20 05:43:46 +00:00
fa fantomas: 6.3.1 -> 6.3.4 2024-04-16 13:07:44 +02:00
fb/fbset
fc
fe treewide: replace prefetch-yarn-deps with fixup-yarn-lock where necessary 2024-04-17 13:34:05 -04:00
ff
fi Merge pull request from savyajha/firefly-iii 2024-04-20 13:56:08 +02:00
fl Merge pull request from lucasew/upd-flet-client-flutter-0.21.2 2024-04-13 15:51:48 -03:00
fm fm-go: 1.0.0 -> 1.1.0 2024-04-17 13:49:15 +00:00
fn/fnott
fo Merge pull request from isabelroses/add-fork-cleaner 2024-04-20 13:14:13 +08:00
fr Francis: init at 1.1.0 () 2024-04-09 23:37:20 +08:00
fs
fu/fuchsia-cursor
fv
fw/fwupd
fy/fypp
fz/fzf-make fzf-make: 0.27.0 -> 0.28.0 2024-04-17 21:22:08 +02:00
g3/g3kb-switch
ga gatus: 5.9.0 -> 5.10.0 2024-04-19 13:57:17 +00:00
gb/gbar
gc
ge
gf
gg/gg
gh ghunt: add missing dependencies 2024-04-16 13:00:33 +02:00
gi gitu: 0.16.0 -> 0.17.1 2024-04-19 15:00:00 -04:00
gl Merge pull request from oluceps/add-glider 2024-04-20 15:17:51 +08:00
gm gmid: migrate to by-name 2024-04-10 19:47:15 +04:00
gn
go go-judge: 1.8.2 -> 1.8.3 2024-04-17 13:37:13 +00:00
gp
gr graphicsmagick: include pkg-config among nativeBuildInputs 2024-04-10 11:43:13 +02:00
gt gtfocli: init at 0.0.4 2024-04-18 19:30:51 +02:00
gu guix: add patch for CVE-2024-27297 2024-04-10 07:30:37 +02:00
gv/gvisor add aarch64-linux () 2024-04-20 15:01:31 +02:00
gx/gxml
h8/h8mail
ha handheld-daemon: undo refactor 2024-04-17 09:21:19 +02:00
hd/hdrop
he hermitcli: 0.39.0 -> 0.39.1 2024-04-10 13:06:26 +00:00
hi himalaya: 1.0.0-beta.3 -> 1.0.0-beta.4 2024-04-18 08:41:06 +02:00
hj/hjson-go
ho home-manager: unstable-2024-04-10 -> unstable-2024-04-16 2024-04-17 16:07:34 +00:00
ht
hu hugo: 0.124.1 -> 0.125.0 2024-04-17 01:09:28 +00:00
hy Merge pull request from IogaMaster/hypridle 2024-04-19 19:29:27 +08:00
i2/i2p i2p: 2.4.0 -> 2.5.0 2024-04-11 22:52:25 +08:00
i3
ia
ic icloudpd: 1.17.3 -> 1.17.4 2024-04-14 22:59:46 +00:00
id
if/ifrextractor-rs
ig igir: 2.6.2 -> 2.6.3 2024-04-13 01:01:03 +00:00
ii
im Merge pull request from kai-tub/pkgs/immich-go/init 2024-04-17 18:47:39 +10:00
in treewide: replace prefetch-yarn-deps with fixup-yarn-lock where necessary 2024-04-17 13:34:05 -04:00
io/ioq3-scion
ip
ir iredis: fix build on x86_64-darwin 2024-04-15 04:20:00 +00:00
it
ja Merge : staging-next 2024-04-12 2024-04-19 16:30:52 +02:00
jd/jdt-language-server
je
ji
jj/jj
jn
jo
jr/jrl-cmakemodules jrl-cmakemodules: init at 0-unstable-2024-04-12 2024-04-15 02:43:26 +02:00
js/jsoncons
ju justbuild: Fix build 2024-04-09 20:05:23 +02:00
ka Merge pull request from quantenzitrone/katawa-shoujo-re-engineered 2024-04-19 07:04:04 +02:00
kc kcl-cli: 0.8.5 -> 0.8.6 2024-04-20 02:18:42 +00:00
kd/kdsingleapplication
ke keydb: init at 6.3.4 2024-04-11 10:47:07 +02:00
kg/kgeotag
ki kittysay: init at 0.5.0 2024-04-14 17:38:53 +01:00
kl/klog-time-tracker
km
kn/knossosnet
ko Merge pull request from r-ryantm/auto-update/kokkos 2024-04-12 10:19:03 +02:00
kp/kplex
kr
ks
kt Merge pull request from arthsmn/ktls-utils-refactor 2024-04-17 18:11:52 +02:00
ku kubo: 0.27.0 -> 0.28.0 2024-04-15 13:20:22 +00:00
kx/kxstitch
ky/kyverno-chainsaw
la labelle: init at 1.1.0 2024-04-16 21:21:28 +02:00
lb lbreakouthd: 1.1.6 -> 1.1.7 2024-04-09 22:00:48 +00:00
lc/lcab
ld/ldproxy
le Merge pull request from r-ryantm/auto-update/lefthook 2024-04-16 11:04:40 +00:00
li Merge pull request from r-ryantm/auto-update/livekit 2024-04-18 20:55:28 +02:00
ll llama-cpp: 2636 -> 2674 2024-04-14 23:18:05 +00:00
lm/lmstudio
ln/lngen
lo local-ai: 2.12.3 -> 2.12.4 2024-04-14 15:19:43 +00:00
lp
ls
lt/ltris
lu lubelogger: 1.2.9 -> 1.3.0 2024-04-09 03:47:10 +00:00
lw/lwgrp
lx treewide: replace prefetch-yarn-deps with fixup-yarn-lock where necessary 2024-04-17 13:34:05 -04:00
lz
m2
ma Merge pull request from kevincox/mautrix-meta-0.3 2024-04-19 06:18:08 -04:00
mb
mc mcap-cli: 0.0.42 -> 0.0.43 2024-04-18 08:16:24 +00:00
md
me Merge master into staging-next 2024-04-18 00:02:13 +00:00
mf
mg/mgitstatus
mi minijinja: 1.0.17 -> 1.0.20 2024-04-14 06:48:32 +00:00
mk
ml/mlx42
mo Merge pull request from oluceps/add-moproxy 2024-04-20 00:33:35 +08:00
mp
mq mqttui: format with nixfmt 2024-04-20 12:31:01 +02:00
ms
mu
my mycelium: 0.5.0 -> 0.5.1 2024-04-19 18:14:14 +02:00
n2/n2
na namespace-cli: 0.0.355 -> 0.0.356 2024-04-15 22:23:41 +00:00
nb/nbtscan
nc
nd/ndstrim
ne Merge pull request from Tom-Hubrecht/netbird-server 2024-04-20 11:21:10 +02:00
nf/nfft
ng/ngrid
nh nh: 3.5.7 -> 3.5.10 2024-04-09 22:27:51 +00:00
ni Merge pull request from NickCao/niri 2024-04-17 09:38:02 +02:00
nl
nm/nmap-parse
nn/nncp
no Merge pull request from fabaff/nomore403 2024-04-19 08:52:13 +02:00
np
nr
ns
nt/ntfs2btrfs
nu nuclei-templates: format with nixfmt 2024-04-12 08:53:20 +02:00
nv
nw nwg-hello: 0.1.9 -> 0.1.10 2024-04-20 03:09:04 +00:00
oa
ob obs-cmd: 0.17.5 -> 0.17.6 2024-04-11 17:01:37 +00:00
oc ocis-bin: 5.0.0 -> 5.0.1 2024-04-11 21:19:36 +05:30
oe/oelint-adv oelint-adv: 5.1.2 -> 5.1.3 2024-04-16 13:19:20 +00:00
of offat: 0.17.0 -> 0.17.2 2024-04-20 02:51:25 +00:00
oh/oh-my-fish
oi
ol/olvid
om/omniorbpy
on
op openvas-scanner: init at 23.0.1 2024-04-14 11:18:01 +02:00
or orchard: 0.16.1 -> 0.17.0 2024-04-18 02:50:58 +00:00
os
ot oterm: 0.2.5 -> 0.2.6 2024-04-20 08:45:15 +00:00
ou
ov Merge pull request from astro/ovmf-chv 2024-04-19 13:27:37 -04:00
ow
pa pacu: 1.5.2 -> 1.5.3 2024-04-15 16:32:29 +00:00
pd Merge pull request from anthonyroussel/update/puppet-lint 2024-04-15 08:12:49 -05:00
pe
pf/pfft
pg pgroll: init at 0.5.0 2024-04-09 15:58:23 +03:00
ph
pi pixi: 0.17.1 -> 0.19.1 2024-04-15 13:45:05 +08:00
pk pkcs11-provider: init at 0.3 2024-04-09 23:18:09 -07:00
pl
pm
pn
po poppins: init at 4.003 2024-04-19 23:15:36 +09:00
pp/ppsspp
pq
pr proto: 0.34.3 -> 0.34.4 2024-04-19 21:17:32 +00:00
pt
pu Merge pull request from anthonyroussel/update/puppet-lint 2024-04-15 08:12:49 -05:00
pv/pvsneslib
pw
px/pxder treewide: replace prefetch-yarn-deps with fixup-yarn-lock where necessary 2024-04-17 13:34:05 -04:00
py pyright: repackage using buildNpmPackage 2024-04-18 23:11:39 +03:00
pz/pzip
qa/qadwaitadecorations
qc/qcm
qd/qdirstat
qg/qgrep
qp/qpoases qpoases: init at 3.2.1 2024-04-14 12:49:13 +02:00
qr qrtool: 0.10.7 -> 0.10.8 2024-04-16 11:10:55 +00:00
qs
qt/qtractor
qu quarkus: 3.9.3 -> 3.9.4 2024-04-18 17:31:07 +00:00
r1/r10k
ra radcli: init at 1.3.1 2024-04-13 15:12:04 +02:00
rc
rd/rdwatool
re Merge pull request from oluceps/add-restls 2024-04-20 00:32:18 +08:00
ri rippkgs: add cdmistman as maintainer 2024-04-19 10:57:33 -04:00
rk/rkbin
rl/rl_json
rm rmenu: 1.2.0 -> 1.2.1 2024-04-16 21:07:15 +02:00
rn/rnd-name
ro rosa: set passthru.updateScript to nix-update-script 2024-04-09 12:23:20 -04:00
rp/rpcs3 rpcs3: 0.0.31-16271-4ecf8ecd0 -> 0.0.31-16334-fba1db29b 2024-04-13 17:56:58 +00:00
rq/rqbit
rs rs: fix darwin 2024-04-16 19:23:09 +10:00
rt/rtg-tools rtl-sdr: refactor, add rtl-sdr-blog and set it as default 2024-04-16 20:55:35 +02:00
ru ruapu: init at 0.1.0 2024-04-14 23:32:41 +08:00
rw/rwpspread
ry Merge pull request from r-ryantm/auto-update/ryujinx 2024-04-16 02:21:26 +00:00
s3
sa sandbar: init at 0.1 2024-04-19 12:49:42 +02:00
sb/sbom-utility sbom-utility: init at 0.15.0 2024-04-15 11:21:07 +02:00
sc scrutiny: 0.8.0 -> 0.8.1 2024-04-11 08:02:56 +01:00
sd
se sendme: 0.3.0 -> 0.5.0 2024-04-17 11:17:02 -06:00
sg/sgfutils
sh shadow-tls: init at 0.2.25 2024-04-19 17:07:49 +00:00
si Merge pull request from skeuchel/riscv-simde 2024-04-17 17:09:35 +02:00
sl
sm smassh: init at 3.1.3 2024-04-15 14:12:06 +02:00
sn snapcraft: init at 8.2.0 2024-04-18 19:06:42 +01:00
so Merge pull request from aikooo7/update-solana-cli-to-1.17.31 2024-04-19 21:14:10 +00:00
sp Merge pull request from r-ryantm/auto-update/spicetify-cli 2024-04-16 09:50:23 -04:00
sq
sr srm-cuarzo: 0.5.5-1 -> 0.5.6-1 2024-04-14 02:31:53 +00:00
ss ssh-tpm-agent: Fix homepage link 2024-04-19 22:04:13 +02:00
st Merge pull request from panicgh/storcli 2024-04-18 01:48:26 +08:00
su Merge pull request from MDM23/update-surrealist 2024-04-18 11:35:53 +02:00
sv
sw Merge pull request from hakan-demirli/swww 2024-04-18 22:48:23 +08:00
sx
sy symfony-cli: 5.8.14 -> 5.8.15 2024-04-18 17:31:11 +00:00
t-/t-rex
ta Merge pull request from mlaradji/add-taskwarrior-3 2024-04-19 13:24:37 +02:00
tc/tcsh Merge pull request from suominen/tcsh-6.24.12 2024-04-17 17:04:33 +02:00
td/tdl tdl: 0.16.1 -> 0.16.2 2024-04-16 05:15:50 +00:00
te tenki: 1.6.0 -> 1.7.0 2024-04-17 18:12:23 +00:00
tg/tgpt
th thcrap-steam-proton-wrapper: init at 0-unstable-2024-04-03 2024-04-09 12:37:40 +02:00
ti tinymist: 0.11.3 -> 0.11.4 2024-04-16 12:42:07 +03:00
tk/tkdiff
tl
tm/tmuxifier
to tootik: 0.10.0 -> 0.10.2 2024-04-20 01:04:12 +00:00
tp tpnote: 1.24.0 -> 1.24.2 2024-04-13 00:12:53 +10:00
tr Merge pull request from kiike/update-tridactyl 2024-04-19 18:40:47 +02:00
tt/ttop
tu
tw/twitch-dl twitch-dl: 2.1.4 -> 2.2.0 2024-04-15 04:20:00 +00:00
tx/txr
ty typstyle: 0.11.12 -> 0.11.13 2024-04-12 23:21:01 +08:00
uc
ud
ue
ug ugm: 1.4.0 -> 1.5.0 2024-04-13 10:57:31 +00:00
ui uiua: 0.10.2 -> 0.10.3 2024-04-10 22:39:46 +02:00
um/umpire umpire: 2024.02.0 -> 2024.02.1 2024-04-16 15:01:08 +00:00
un unciv: 4.11.2 -> 4.11.4 2024-04-13 18:35:05 +00:00
up uplosi: 0.1.3 -> 0.2.0 2024-04-15 11:49:05 +02:00
us/usql
ut
uu/uuu uuu: 1.5.141 -> 1.5.179 2024-04-11 18:16:00 -03:00
uv/uv uv: 0.1.34 -> 0.1.35 2024-04-20 11:06:16 +02:00
uw/uwhoisd
ux/uxn uxn: unstable-2024-04-05 -> unstable-2024-04-15 2024-04-19 00:12:37 +00:00
va
vc
ve vencord: 1.7.4 -> 1.7.8 2024-04-18 13:16:56 +02:00
vg/vgm2x
vi victoriametrics: 1.100.0 -> 1.100.1 2024-04-12 19:55:20 +00:00
vl
vo/voidmap voidmap: init at 1.1.5-unstable-2023-09-13 2024-04-16 10:02:01 -06:00
vu vunnel: 0.21.2 -> 0.22.0 2024-04-12 10:24:12 +00:00
vv/vvvvvv
wa Merge pull request from DontEatOreo/update-warp-terminal 2024-04-20 11:47:02 -03:00
wb/wb32-dfu-updater
we wechat-uos: fix IM issue 2024-04-11 15:58:21 +08:00
wh where-is-my-sddm-theme: 1.9.0 -> 1.9.1 2024-04-18 08:38:10 +00:00
wi wiremock: 3.5.2 -> 3.5.3 2024-04-19 12:14:27 +00:00
wl wlr-layout-ui: init at 1.4.7 2024-04-15 09:27:45 +02:00
wo workout-tracker: 0.12.0 -> 0.13.4 2024-04-17 22:45:01 +00:00
wp/wp-cli
ws wslu: 4.1.2 -> 4.1.3 2024-04-11 03:19:22 +00:00
wt/wtfis
wy/wyoming-satellite
x1/x16
x5/x509-limbo
xa/xarcan
xc
xd xdg-terminal-exec: 0.9.0 -> 0.9.3 2024-04-13 16:00:28 +02:00
xe xeve: init at 0.4.3 2024-04-11 16:50:54 +02:00
xf/xfs-undelete
xi
xm
xo Reapply "xonsh: set dontWrapPythonPrograms" 2024-04-11 08:26:39 -07:00
xp/xplr
xr/xr-hardware
xs
xw/xwayland-run
ya yamlscript: 0.1.52 -> 0.1.56 2024-04-16 17:09:44 +00:00
yc/ycmd
ye
yg/yggdrasil
yj/yj
yo youtrack: 2024.1.26888 -> 2024.1.27971 2024-04-12 04:35:21 +00:00
ys/ysfx
yt
yu
za zapzap: 5.2.1 -> 5.3 2024-04-18 04:20:27 +00:00
zb/zbus-xmlgen
zc/zcfan
ze zed-editor: 0.130.6 -> 0.130.7 2024-04-15 23:08:14 +02:00
zi zitadel: fix vendorHash for go1.22 2024-04-14 14:27:50 +09:00
zl/zluda ZLUDA: init at 3 2024-04-13 15:22:03 +03:00
zo/zola
zp
zs
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;
}