nixpkgs/pkgs/by-name
2024-03-22 09:03:10 +01:00
..
_4/_4th
_9/_9base
a4/a4
a5/a52dec a52dec: 0.7.4 -> 0.8.0 2024-03-18 12:55:54 +01:00
aa treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
ab/aba
ac
ad treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
ae
af
ag/ags
ai treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
al alephone-apotheosis-x: change license to unfree 2024-03-20 20:48:45 +01:00
am amfora: migrate to by-name 2024-03-19 20:02:18 +04:00
an
ao/aocl-utils
ap
ar Merge pull request #296826 from NotAShelf/bump-arrpc 2024-03-22 00:35:36 +01:00
as Merge master into staging-next 2024-03-20 12:01:15 +00:00
at treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
au Merge pull request #292109 from jvanbruegge/authentik-2024.2 2024-03-21 16:45:59 +07:00
av
aw
ax/axmldec
ay
ba treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
bc/bc-ur
be treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
bi treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
bk/bk
bl blockbench: 4.8.1 -> 4.9.4, refactor 2024-03-16 05:47:48 +02:00
bm/bmake
bn/bngblaster
bo
bp/bpftop bpftop: 0.2.3 -> 0.3.0 2024-03-18 04:03:14 +00:00
br bruno: 1.10.0 -> 1.11.0 2024-03-16 00:00:59 +00:00
bs/bsync
bu butler: mark broken 2024-03-19 11:10:28 +01:00
by
c-
c2 treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
ca Merge pull request #296644 from DanNixon/cargo-pgo 2024-03-20 11:45:35 +02:00
cb/cbmbasic
cc/ccache
cd treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
ce Merge pull request #295661 from mkg20001/cert-viewer 2024-03-20 07:39:01 +01:00
cg/cgl
ch Merge pull request #292494 from jtbx/chawan 2024-03-19 19:47:16 +00:00
ci treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
cl Merge pull request #297102 from lf-/jade/clangbuildanalyzer 2024-03-19 17:01:03 -07:00
cm
cn/cntb treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
co Merge pull request #288627 from ahoneybun/resync-cosmic-edit 2024-03-21 00:46:33 +01:00
cp treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
cr crossplane-cli: 1.15.0 -> 1.15.1 2024-03-16 07:59:40 +00:00
cs
ct/ctx
cu Merge pull request #297569 from anthonyroussel/update-cucumber 2024-03-21 07:23:31 -05:00
cy treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
cz/czkawka
da dark-mode-notify: sync clang with swift itself 2024-03-18 11:38:42 +01:00
db/dbus-cpp
dc/dc3dd
dd
de devenv: add meta attributes 2024-03-22 09:03:10 +01:00
di dissent: 0.0.21 -> 0.0.22 2024-03-20 16:46:44 -03:00
dj/djent treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
dm treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
dn/dns2tcp
do treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
dp/dpp
dr/drone-scp
ds treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
dt/dtcmp
du
dv/dvb-apps
dx treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
dy dynamodb-local: 2.2.1 -> 2.3.0 2024-03-15 22:53:34 +00:00
ea/easyeasm
eb
ec treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
ed
ei eigenlayer: 0.6.2 -> 0.6.3 2024-03-20 16:21:01 +00:00
ek/eksctl eksctl: 0.173.0 -> 0.174.0 2024-03-16 01:09:32 +00:00
el treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
em
en treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
er
es
et/etlegacy
eu
ex
ez/eza eza: 0.18.7 -> 0.18.8 2024-03-21 10:00:51 +01:00
fa treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
fb/fbset
fc
fe
ff
fi treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
fl flet-client-flutter: init at 0.21.1 2024-03-19 21:43:14 +01:00
fm
fn/fnott
fo Merge pull request #296983 from r-ryantm/auto-update/folio 2024-03-21 15:27:36 +00:00
fr
fs fsuae: strip .dat archive for determinism 2024-03-18 19:37:09 +01:00
fu/fuchsia-cursor
fw/fwupd
fy/fypp treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
g3/g3kb-switch treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
ga treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
gb/gbar
gc
ge treewide: remove licenses.agpl3 2024-03-21 18:09:24 +02:00
gg/gg
gh Merge pull request #297073 from PerchunPak/gh-copilot 2024-03-20 07:39:38 +01:00
gi treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
gl Merge pull request #285513 from jakuzure/glasskube-init 2024-03-21 22:56:18 +01:00
gm treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
gn
go Merge pull request #296715 from linyinfeng/godns-by-name 2024-03-20 10:43:15 -04:00
gp
gr treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
gt treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
gu
gx/gxml
h8/h8mail
ha treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
hd/hdrop treewide: remove licenses.agpl3 2024-03-21 18:09:24 +02:00
he treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
hi hifiscan: init at 1.5.2 (#285560) 2024-03-21 14:59:34 +04:00
hj/hjson-go
ho home-manager: unstable-2024-03-15 -> unstable-2024-03-19 2024-03-20 02:57:02 +00:00
ht
hu/hugo hugo: 0.123.8 -> 0.124.0 2024-03-17 01:25:05 +00:00
hy hyprnome: cleanup 2024-03-15 13:40:10 -04:00
i3
ia
ic
id
if/ifrextractor-rs treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
ig ignite-cli: 28.2.0 -> 28.3.0 2024-03-20 23:22:02 +00:00
ii
im Merge pull request #290893 from pcasaretto/immersed-vr-darwin 2024-03-21 13:27:53 +01:00
in Merge pull request #296081 from r-ryantm/auto-update/intune-portal 2024-03-16 11:10:03 -07:00
io/ioq3-scion
ip
ir/ironbar
it/itch
ja treewide: remove licenses.agpl3 2024-03-21 18:09:24 +02:00
jd/jdt-language-server
ji
jj/jj
jn jnv: init at 0.1.2 2024-03-21 14:14:06 -04:00
jo Merge pull request #296549 from TomaSajt/strip-java-archives-hook 2024-03-19 05:41:08 +01:00
js/jsoncons
ju justbuild: mark as broken 2024-03-18 14:22:45 +01:00
ka
kc
kd/kdsingleapplication
ke
kg/kgeotag
ki
kl/klog-time-tracker
km
kn/knossosnet
ko
kp/kplex
kr krbjack: init at 0-unstable-2024-02-08 2024-03-17 12:19:07 +01:00
ks/kseexpr
kt
ku treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
kx/kxstitch
ky/kyverno-chainsaw kyverno-chainsaw: 0.1.7 -> 0.1.9 2024-03-16 11:41:14 +00:00
la lacus: init at 1.8.0 2024-03-21 11:00:18 +01:00
lb
lc/lcab
le treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
li treewide: remove licenses.agpl3 2024-03-21 18:09:24 +02:00
ll llama-cpp: 2454 -> 2481 2024-03-21 17:34:35 +00:00
ln/lngen treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
lo treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
lp treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
ls
lt/ltris
lu lubelogger: 1.2.7 -> 1.2.8 2024-03-21 18:42:44 +00:00
lw/lwgrp
lz treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
m2
ma Merge pull request #296780 from wegank/opencflite-bump 2024-03-20 14:42:25 +01:00
mb/mbpoll
mc treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
md
me mercure: 0.15.9 -> 0.15.10 2024-03-20 04:30:17 +00:00
mf treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
mg/mgitstatus
mi Merge pull request #287966 from Guanran928/clash-meta 2024-03-21 10:40:10 +02:00
mk treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
ml/mlx42
mo treewide: remove licenses.agpl3 2024-03-21 18:09:24 +02:00
mp/mpifileutils
mq
ms mscompress: init at 0.4 (#297688) 2024-03-21 14:51:37 +01:00
mu
my mystmd: 1.1.46 -> 1.1.47 2024-03-18 06:31:28 +00:00
n2/n2 treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
na Merge pull request #297114 from r-ryantm/auto-update/namespace-cli 2024-03-19 09:12:09 -04:00
nb/nbtscan treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
nc treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
nd/ndstrim
ne treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
nf/nfft
nh
ni Merge pull request #296479 from marcusramberg/marcus/nimdow 2024-03-21 12:14:56 +01:00
nl treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
nm/nmap-parse
nn/nncp
no Merge pull request #272530 from yannickulrich/normaliz-v3.10.1 2024-03-21 17:09:25 +01:00
np
nr treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
ns treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
nu treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
nv cudaPackages: generalize and refactor setup hook 2024-03-15 15:54:21 +01:00
nw
oa treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
ob
oc octorpki: drop 2024-03-19 08:47:42 +01:00
oe/oelint-adv oelint-adv: 4.4.1 -> 4.4.4 2024-03-19 11:35:31 +00:00
of/offpunk
oh/oh-my-fish
oi
ol/olvid treewide: remove licenses.agpl3 2024-03-21 18:09:24 +02:00
on treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
op Merge pull request #296780 from wegank/opencflite-bump 2024-03-20 14:42:25 +01:00
or
os
ot
ou
ov
ow owmods-cli: fix build on darwin 2024-03-20 22:37:22 +01:00
pa treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
pd treewide: remove licenses.agpl3 2024-03-21 18:09:24 +02:00
pe treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
pf/pfft
pg
ph
pi treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
pk/pkcrack
pl treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
pm
pn
po
pp/ppsspp
pq
pr pretix: restrict to linux 2024-03-21 15:20:58 +01:00
pt treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
pu
pw
px/pxder
py pyprland: 2.0.8 -> 2.0.9 2024-03-17 19:26:59 +00:00
pz/pzip
qa/qadwaitadecorations qadwaitadecorations-qt6: 0.1.4 -> 0.1.5 2024-03-21 09:16:11 +00:00
qc/qcm
qd/qdirstat
qg/qgrep treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
qr qrtool: 0.10.5 -> 0.10.6 2024-03-17 15:36:20 +00:00
qs
qt/qtractor
qu
ra
rc
rd/rdwatool rdwatool: init at 1.2-unstable-2023-11-27 2024-03-17 14:55:42 +01:00
re renode-unstable: 1.14.0+20240315gita7bdc1e0e -> 1.15.0+20240320git97be875a3 2024-03-21 12:42:50 +00:00
ri treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
rk/rkbin rkbin: make passthru attributes use full paths, fix license, fix BL31_RK3568 path 2024-03-22 08:46:57 +03:00
rl/rl_json
rm/rmg
ro rofimoji: 6.1.0 -> 6.2.0 2024-03-21 01:29:16 +01:00
rp/rpcs3
rq/rqbit
rs Merge pull request #295753 from MatthewCroughan/mc/rs-tftpd 2024-03-20 10:29:10 -04:00
rt/rtl-sdr-osmocom
ru treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
rw/rwpspread
ry/ryujinx ryujinx: 1.1.1231 -> 1.1.1239 2024-03-19 06:03:41 +00:00
s3 treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
sa satty: 0.11.2 -> 0.11.3 2024-03-20 09:23:50 +01:00
sc treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
sd
se selenium-manager: fix darwin build 2024-03-17 15:01:44 +01:00
sg/sgfutils
sh treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
si treewide: remove licenses.agpl3 2024-03-21 18:09:24 +02:00
sl slimserver: Logitech -> LMS-Community 2024-03-20 08:59:44 -04:00
sm treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
sn treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
so soupault: mv to by-name 2024-03-20 16:42:45 +01:00
sp spade: 0.6.0 -> 0.7.0 2024-03-21 22:40:12 +01:00
sq
sr srm-cuarzo: 0.5.4-1 -> 0.5.5-1 2024-03-17 02:31:16 +00:00
ss treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
st stanc: move to by-name, refactor 2024-03-21 15:07:51 +01:00
su surrealdb: migrate to by-name 2024-03-18 17:04:09 +04:00
sv
sw treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
sx
sy symfony-cli: 5.8.8 -> 5.8.12 2024-03-21 10:07:12 +01:00
t-/t-rex
ta Merge master into staging-next 2024-03-20 00:02:08 +00:00
tc/tcsh treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
td/tdl
te Merge pull request #293326 from FabianRig/init-technitium-dns-server 2024-03-21 11:32:15 +03:00
tg/tgpt tgpt: 2.7.1 -> 2.7.2 2024-03-17 22:33:27 +01:00
th
ti treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
tk/tkdiff
tl
tm/tmuxifier
to
tp
tr treewide: remove licenses.agpl3 2024-03-21 18:09:24 +02:00
tt/ttop
tu treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
tx/txr txr: 293 -> 294 2024-03-19 00:21:06 +00:00
ty typstfmt: 0.2.7 -> 0.2.9 2024-03-21 20:35:42 +01:00
uc
ud treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
ue
ui
um/umpire
un treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
up upiano: allow later textual releases 2024-03-20 14:07:27 +01:00
us/usql
ut
uu/uuu
uv/uv uv: 0.1.21 -> 0.1.22 2024-03-18 04:20:00 +00:00
ux/uxn uxn: unstable-2024-03-16 -> unstable-2024-03-18 2024-03-20 12:10:05 +00:00
va
vc treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
ve
vg/vgm2x
vi treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
vl
vu/vulkan-volk
wa Merge pull request #297072 from FedericoSchonborn/add-federicoschonborn 2024-03-19 23:12:06 +08:00
wb/wb32-dfu-updater
we
wh
wi
wl wl-clipboard-rs: add myself as maintainer 2024-03-16 10:56:59 -04:00
wo
wp/wp-cli wp-cli: add changelog to meta 2024-03-17 09:33:23 +01:00
ws
wt/wtfis treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
x1/x16
x5/x509-limbo treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
xa/xarcan treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
xc
xd xdg-terminal-exec: unstable-2023-12-08 -> 0.9.0 2024-03-19 23:02:23 +01:00
xe/xeol xeol: init at 0.9.13 2024-03-18 15:32:55 +01:00
xf/xfs-undelete treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
xi xiu: 0.12.4 -> 0.12.5 2024-03-16 02:53:37 +00:00
xm
xo
xp/xplr Merge pull request #297018 from r-ryantm/auto-update/xplr 2024-03-19 09:02:38 -04:00
xr/xr-hardware
xs treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
xw/xwayland-run
ya yamlscript: 0.1.41 -> 0.1.45 2024-03-19 14:13:37 +00:00
ye
yg/yggdrasil
yj/yj
yo
ys/ysfx
yt yt-dlg: init at 1.8.5 2024-03-17 08:11:10 +01:00
yu/yunfaavatar
za treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
zb/zbus-xmlgen
zc/zcfan treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
ze/zesarux treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
zi treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
zo/zola treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
zp treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
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

$ ./pkgs/test/nixpkgs-check-by-name/scripts/run-local.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;