nixpkgs/pkgs/by-name
расходный материал 6abc2cbbc4
keyguard: 1.6.0 -> 1.6.1 (#346823)
Co-authored-by: dr56ekgbb <dr56ekgbb@mozmail.com>
2024-10-06 18:48:43 +02:00
..
_0
_1 treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
_2/_2ship2harkinian
_4
_6/_64gram
_9
a4/a4
a5/a52dec treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
aa
ab ab-av1: 0.7.17 -> 0.7.18 2024-10-04 13:23:11 +00:00
ac treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
ad treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
ae
af
ag agebox: move to by-name 2024-10-04 13:56:37 +02:00
ai aiken: 1.1.3 -> 1.1.4 2024-10-03 12:32:35 +00:00
al alpaca: 2.0.5 -> 2.0.6 (#346796) 2024-10-06 12:10:43 +02:00
am
an
ao/aocl-utils
ap apfsprogs: unstable-2023-11-30 -> 0-unstable-2024-09-27 2024-10-04 15:50:10 +02:00
aq/aquamarine
ar arduino-ide: 2.3.2 -> 2.3.3 (#344426) 2024-10-06 17:31:13 +09:00
as
at atlassian-plugin-sdk: init at 9.1.1 (#345085) 2024-10-05 19:45:05 +02:00
au
av
aw awscli2: 2.17.56 -> 2.17.64 (#346014) 2024-10-05 19:45:03 +00:00
ax
ay
az azuki: init at 0-unstable-2021-07-02 (#325611) 2024-10-04 16:43:44 -07:00
b3/b3sum
ba bazecor: 1.5.0 -> 1.5.1 (#346238) 2024-10-04 22:04:16 +02:00
bc
bd
be
bi bibletime: migrate to by-name (#344546) 2024-10-03 19:37:50 +02:00
bk/bk
bl blockbench: 4.11.0 -> 4.11.1 2024-10-04 23:58:56 +00:00
bm
bn/bngblaster
bo bombsquad: update hashes (#346693) 2024-10-05 21:31:05 +02:00
bp
bq/bqn
br brainflow: 5.13.3 -> 5.14.0 2024-10-02 14:27:12 +00:00
bs
bt
bu bundletool: moved to by-name and modernized derivation (#346159) 2024-10-05 09:30:10 +09:00
by
c-
c2
c3/c3-lsp
ca canokey-usbip: init at unstable-2024-03-11 (#341670) 2024-10-05 14:52:45 +02:00
cb
cc
cd
ce
cf cfn-nag: moved to by-name 2024-10-02 15:16:17 +09:00
cg
ch treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
ci cinny-desktop: fix darwin build (#346640) 2024-10-06 12:12:06 +02:00
cj/cjs
cl cloudflare-dynamic-dns: 4.3.3 -> 4.3.5 (#346607) 2024-10-05 09:23:19 -04:00
cm
cn
co cosmic-bg: 1.0.0-alpha.1 -> 1.0.0-alpha.2 (#344487) 2024-10-06 15:45:42 +02:00
cp
cq/cq
cr treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
cs csv-tui: 1.1 -> 1.2 2024-10-02 22:28:18 +00:00
ct/ctx
cu
cv/cvemap
cw/cwe-client-cli
cy
cz/czkawka
da
db
dc treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
dd
de deck: 1.40.2 -> 1.40.3 (#345095) 2024-10-05 11:48:37 +02:00
dg
dh/dhcpig
di dinit: init at 0.19.0 2024-10-06 10:32:17 -04:00
dj/djent
dm
dn
do dotenvx: 1.14.1 -> 1.14.2 2024-10-04 23:39:18 +00:00
dp
dr
ds
dt
du dumbpipe: 0.17.0 -> 0.18.0 2024-10-01 23:57:39 -04:00
dv
dw treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
dx
dy
e1/e1s e1s: fix changelog url 2024-10-06 04:17:38 +02:00
ea
eb
ec
ed
ee/eepers
ef
eg/eg25-manager
ei eigenlayer: 0.10.4 -> 0.10.6 2024-10-02 09:46:34 +00:00
ej
ek treewide: migrate packages maintained by ivankovnatsky to by-name 2024-10-04 16:31:04 +03:00
el
em
en entangle: fix build (#344986) 2024-10-06 02:55:58 +02:00
eo/eog treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
ep
er
es
et
eu
ev treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
ew
ex exo: 0-unstable-2024-10-03 -> 0-unstable-2024-10-06 2024-10-06 10:19:18 +02:00
ey/eyewitness
ez/eza eza: 0.20.0 -> 0.20.1 2024-10-03 08:31:11 +02:00
f2/f2fs-tools
fa fabric-ai: 1.4.26 -> 1.4.46 (#346638) 2024-10-06 15:33:10 +00:00
fb/fbset
fc
fd/fdroidserver
fe feishin: 0.9.0 -> 0.10.1 (#344865) 2024-10-06 10:27:49 +02:00
ff
fg/fgqcanvas
fi finamp: 0.9.9-beta -> 0.9.11-beta (#342972) 2024-10-06 15:13:41 +02:00
fj/fjo
fl fluent-bit: 3.1.8 -> 3.1.9 2024-10-04 22:08:34 +02:00
fm
fn/fnott
fo treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
fr
fs
ft
fu
fv
fw/fwupd
fx/fx
fy
fz
g-/g-wrap g-wrap: migrate to by-name 2024-10-04 13:09:18 -03:00
g3/g3kb-switch
ga nixos/gatus: init module (#294469) 2024-10-02 11:08:14 +02:00
gb
gc
gd treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
ge getmail6: 6.19.04 -> 6.19.05 (#346025) 2024-10-04 14:03:33 -07:00
gf
gg gg-jj: init at 0.20.0 2024-10-02 20:36:17 +08:00
gh treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
gi github-runner: 2.319.1 -> 2.320.0 (#346347) 2024-10-06 15:53:17 +02:00
gk/gk-cli
gl
gm gmic{,-qt}: enable OpenCV, OpenMP (Clang) and X11 (#340855) 2024-10-03 18:12:03 +02:00
gn gnucash: 5.8 -> 5.9 (#345575) 2024-10-06 18:30:00 +02:00
go gokey: 0.1.2-unstable-2023-11-16 -> 0.1.3 (#346749) 2024-10-06 10:55:35 -04:00
gp gpu-viewer: 3.04 -> 3.06 2024-10-05 10:43:31 +02:00
gr treewide: migrate packages maintained by ivankovnatsky to by-name 2024-10-04 16:31:04 +03:00
gt
gu treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
gv/gvisor
gx treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
gz/gzdoom
h2/h2
h5/h5utils
h8/h8mail
ha
hb/hb-honeypot
hc/hclfmt
hd
he hexxy: 0-unstable-2024-09-20 -> 0-unstable-2024-09-29 2024-10-05 09:35:28 +00:00
hi treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
hj/hjson-go
hn/hn-text
ho
hp
hr/hred
ht httplib: remove aidalgol from maintainers 2024-10-04 19:29:48 -03:00
hu hugo: 0.134.3 -> 0.135.0 2024-10-03 10:58:48 +00:00
hv/hvm
hw/hwinfo
hx/hxtools
hy hyprutils: 0.2.2 -> 0.2.3 2024-10-06 10:28:51 +00:00
i2/i2p treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
i3 i3-back: init at 0.3.2 (#346484) 2024-10-05 18:22:24 +02:00
ia treewide: migrate packages maintained by ivankovnatsky to by-name 2024-10-04 16:31:04 +03:00
ic
id treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
if
ig treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
ii
ij
im immich: 1.116.2 -> 1.117.0 (#346127) 2024-10-04 23:06:05 -07:00
in intelli-shell: init at 0.2.7 (#289430) 2024-10-06 03:38:12 +02:00
io treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
ip
ir
is
it
iu/iucode-tool
iv
iw
iz/izrss
j/j treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
ja jan: 0.5.4 -> 0.5.6 2024-10-04 23:39:22 +00:00
jc/jcli treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
jd/jdt-language-server
je
ji
jj/jj
jn
jo
jp/jp-zip-codes
jq/jq-zsh-plugin
jr
js treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
jt/jtdx
ju jujutsu: 0.21.0 → 0.22.0 2024-10-02 19:45:19 +02:00
jw/jwasm
k8/k8s-manifest-sigstore
ka
kb/kbld
kc
kd
ke keyguard: 1.6.0 -> 1.6.1 (#346823) 2024-10-06 18:48:43 +02:00
kg/kgeotag
ki
kl
km
kn
ko
kp/kplex
kr treewide: migrate packages maintained by ivankovnatsky to by-name 2024-10-04 16:31:04 +03:00
ks
kt ktor-cli: init at 0.2.1 2024-10-05 17:17:46 +03:00
ku treewide: migrate packages maintained by ivankovnatsky to by-name 2024-10-04 16:31:04 +03:00
kv/kvmarwaita
kw/kwok
kx
ky treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
la lazyjj: fix build (#346801) 2024-10-06 12:10:26 +02:00
lb
lc
ld
le
lg/lgogdownloader
li shaka-packager: 2.6.1 -> 3.2.0 (#301846) 2024-10-06 14:03:53 +02:00
lk/lk-jwt-service
ll llama-cpp: 3829 -> 3887 2024-10-05 23:09:18 +00:00
lm treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
ln/lngen
lo treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
lp
lr/lrcget
ls
lt/ltris
lu luckybackup: migrate to by-name (#344939) 2024-10-03 19:36:47 +02:00
lv/lv_font_conv
lw
lx lxgw-neoxihei: 1.206 -> 1.207 2024-10-05 05:00:04 +00:00
lz
m1/m1ddc
m2
ma matrix-authentication-service: fix darwin build (#345549) 2024-10-05 14:09:49 +02:00
mb mbtileserver: migrate to by-name 2024-10-03 10:59:35 +04:00
mc
md hyperhdr: init at 20.0.0.0 (#306321) 2024-10-04 02:24:50 +02:00
me treewide: remove unreferenced patch files (#346477) 2024-10-05 00:09:27 +02:00
mf
mg
mi miriway: 0-unstable-2024-08-31 -> 24.09 (#345920) 2024-10-06 17:32:51 +02:00
mk
ml/mlx42
mo mongosh: 2.3.0 -> 2.3.1 2024-10-06 04:32:21 +00:00
mp
mq
mr/mricron
ms treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
mu tor-browser: 13.5.5 -> 13.5.6, mullvad-browser: 13.5.3 -> 13.5.6 (#346226) 2024-10-05 01:03:07 +02:00
my
n2/n2
n8/n8n
n9/n98-magerun2
na nak: init at 0.7.6 2024-10-05 18:23:53 +03:00
nb
nc nchat: 3.67 -> 5.2.11, move to by-name, add luftmensch-luftmensch to maintainers 2024-10-02 13:12:22 +03:00
nd
ne newsraft: 0.25 -> 0.27 2024-10-06 11:31:47 +00:00
nf nf-test: ensure makeWrapper is restricted to nativeBuildInputs 2024-10-02 11:22:41 +02:00
ng
nh
ni
nl
nm treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
nn
no notcurses: 3.0.9 -> 3.0.11 2024-10-02 23:21:23 +00:00
np
nr
ns
nt
nu nuclear: 0.6.31 -> 0.6.39 (#344539) 2024-10-04 22:12:01 +02:00
nv
nw nwg-panel: 0.9.39 -> 0.9.40 2024-10-02 03:08:38 +00:00
nx/nxengine-evo
nz nzbhydra2: 7.6.0 -> 7.7.0 2024-10-03 13:31:53 +00:00
oa
ob {staruml, figma-linux, infracost, obsidian, scaleway-cli, netbeans}: migrate to by-name (#332171) 2024-10-05 21:36:16 +02:00
oc
od treewide: remove empty build inputs 2024-10-04 19:03:59 +02:00
oe/oelint-adv
of
og/oguri
oh
oi
ok okteto: 2.31.0 -> 3.0.0 2024-10-04 16:57:07 +00:00
ol ollama: only set updateScript for ollama, not ollama-{rocm,cuda} (#345375) 2024-10-02 19:39:18 -04:00
om
on onedrive: 1.5.1 -> 1.5.2 2024-10-03 16:08:46 +10:00
oo
op openapi-tui: 0.9.4 -> 0.10.0 2024-10-05 02:43:29 +00:00
oq/oqs-provider
or
os treewide: \xc2\xa0 -> (#345898) 2024-10-03 18:23:59 +02:00
ot
ou
ov overcommit: add passthru.tests.version, meta.mainProgram 2024-10-04 22:42:29 +02:00
ow
pa treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
pc
pd
pe
pf
pg
ph
pi pixi: 0.27.1 -> 0.31.0 2024-10-06 00:50:24 +00:00
pk
pl platformsh: 5.0.21 -> 5.0.22 (#346821) 2024-10-06 12:09:58 +02:00
pm
pn
po powerpipe: 0.4.3 -> 0.4.4 2024-10-06 08:59:28 +00:00
pp/ppsspp
pq
pr project-lemonlime: init at 0.3.5 (#345422) 2024-10-05 18:13:12 +02:00
ps
pt
pu
pv treewide: migrate packages maintained by ivankovnatsky to by-name 2024-10-04 16:31:04 +03:00
pw
px/pxder
py pylyzer: 0.0.64 -> 0.0.65 (#346842) 2024-10-06 12:33:05 +02:00
pz/pzip
qa/qadwaitadecorations
qb/qbittorrent-enhanced
qc/qcm
qd
qg
qm hyperhdr: init at 20.0.0.0 (#306321) 2024-10-04 02:24:50 +02:00
qn/qnial
qo/qodem
qp/qpoases
qq/qq
qr
qs
qt
qu quill-log: 7.2.2 -> 7.3.0 2024-10-05 21:29:18 +00:00
qw/qwerty-fr
r0/r0vm
r1/r10k
ra
rc
rd/rdwatool
re rewind-ai: 1.5284-15284.1-dcd0176-20240504 -> 1.5310-15310.1-5f6bcc5-20240930 (#346426) 2024-10-05 18:13:48 -04:00
rf/rfdump
rh/rHttp
ri ride: refactor and improve electron usage 2024-10-06 12:47:05 +02:00
rk
rl/rl_json
rm
rn
ro roslyn-ls: 2.45.17 -> 2.49.25 (#346233) 2024-10-06 14:17:14 +02:00
rp rpcs3: 0.0.33-16959-60b5adab6 -> 0.0.33-16999-938306a7b 2024-10-02 16:27:56 +00:00
rq
rr/rrdtool
rs
rt rtorrent: fix updateScript eval 2024-10-05 11:34:00 +10:00
ru runme: 3.7.1 -> 3.8.3 2024-10-06 10:35:52 +05:30
rw/rwpspread
rx/rxvt
ry ryujinx: archive.org tarball mirror 2024-10-05 19:08:00 +02:00
s0/s0ix-selftest-tool
s3
sa saga: 9.5.1 -> 9.6.0 2024-10-04 23:21:32 +02:00
sb
sc {staruml, figma-linux, infracost, obsidian, scaleway-cli, netbeans}: migrate to by-name (#332171) 2024-10-05 21:36:16 +02:00
sd
se seilfahrt: init at 1.0.2 (#283819) 2024-10-06 03:41:14 +02:00
sf
sg/sgfutils
sh shopify-cli: 3.63.2 -> 3.67.1 (#343980) 2024-10-06 18:08:58 +02:00
si treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
sk skypeforlinux: 8.129.0.201 -> 8.129.0.202 2024-10-05 07:27:50 +00:00
sl slumber: 2.0.0 -> 2.1.0 2024-10-04 07:02:11 +00:00
sm smbclient-ng: 2.1.5 -> 2.1.6 2024-10-05 13:42:42 +00:00
sn snapcraft: 8.3.3 -> 8.4.1 2024-10-04 11:39:00 +01:00
so
sp splitcode: init at 0.30.0 (#345111) 2024-10-05 14:47:35 +02:00
sq
sr
ss
st stdoutisatty: init at 1.0 (#345558) 2024-10-06 10:24:38 -04:00
su treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
sv
sw treewide: migrate packages maintained by ivankovnatsky to by-name (#345512) 2024-10-05 01:08:54 +02:00
sx
sy
t-/t-rex
ta treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
tb/tbump
tc
td tdl: 0.17.4 -> 0.17.5 2024-10-04 07:30:49 +00:00
te textlint: 14.2.0 -> 14.2.1 2024-10-05 14:47:32 +00:00
tg
th
ti tinymist: 0.11.22 -> 0.11.28 (#346629) 2024-10-06 18:28:27 +02:00
tk
tl
tm
to tor-browser: 13.5.5 -> 13.5.6, mullvad-browser: 13.5.3 -> 13.5.6 (#346226) 2024-10-05 01:03:07 +02:00
tp
tr tradingview: 2.8.1 -> 2.9.2 (#345433) 2024-10-06 02:50:44 +02:00
ts
tt
tu
tw
tx
ty typos-lsp: 0.1.26 -> 0.1.27 (#346560) 2024-10-05 17:38:02 +02:00
u-/u-config
ub
uc
ud
ue
ug
uh/uhttpmock_1_0
ui
um/umpire
un
up upsun: 5.0.21 -> 5.0.22 (#346825) 2024-10-06 12:09:39 +02:00
ur
us
ut
uu/uuu
uv/uv
uw
ux
va vault: 1.17.5 -> 1.17.6, vault-bin: 1.17.5 -> 1.17.6 (#344555) 2024-10-05 11:51:22 +02:00
vc vcpkg: 2024.08.23 -> 2024.09.30 2024-10-04 06:38:19 +00:00
vd/vdhcoapp
ve
vf/vfkit
vg
vi
vk
vl
vm
vn
vo
vp
vr/vrcadvert
vs
vu
vv/vvvvvv
vw/vwsfriend
vy/vyxal vyxal: init at 3.4.9 (#257860) 2024-10-06 15:33:57 +02:00
vz/vzic
wa waybar: libcava 0.10.2 -> 0.10.3 (#345774) 2024-10-05 20:27:10 +02:00
wb
wc wchisp: init at 0.3.0 2024-10-03 21:20:54 -05:00
we werf: 2.10.7 -> 2.10.9 2024-10-06 09:43:29 +00:00
wf/wf-touch
wg wgpu: init at 22.1.0 2024-10-02 16:41:28 +08:00
wh
wi wike: fix cross compilation (#338807) 2024-10-06 17:28:47 +02:00
wl wlink: init at 0.0.9 2024-10-03 14:34:36 -05:00
wo
wp
wr/wrangler
ws wstunnel: 10.1.1 -> 10.1.3 2024-10-03 10:17:33 +02:00
wt
wu/wush wush: 0.2.1 -> 0.3.0 2024-10-04 08:47:48 +00:00
wv
wx/wxc
wy/wyoming-satellite
x1/x16
x5/x509-limbo
xa
xc
xd
xe
xf/xfs-undelete
xh/xhosts
xi
xl
xm xmoji: 0.5.1 -> 0.8 2024-10-03 04:36:48 -04:00
xn/xnlinkfinder
xo
xp
xr
xs
xt/xtf
xu/xunit-viewer
xv/xviewer
xw
ya
yc/ycmd
yd/ydotool
ye
yg
yj/yj
yo treewide: migrate packages maintained by ivankovnatsky to by-name 2024-10-04 16:31:04 +03:00
yp/ypbind-mt
ys/ysfx
yt
yu
za
zb/zbus-xmlgen
zc
ze treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
zf/zfind
zi treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
zl/zluda
zm/zmkBATx
zo zoom-us: 6.2.0.1855 -> 6.2.3.2056 (#345819) 2024-10-05 18:21:22 +02:00
zp treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
zs
zu treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
zw/zwave-js-server
zx treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
zy/zydis treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
zz/zziplib treewide: add meta.changelog (#346488) 2024-10-04 22:35:12 +03:00
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;
}