1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00
nixpkgs/pkgs/by-name
2024-09-11 08:11:13 -04:00
..
_0/_0xpropo
_1/_1fps _1fps: init at 0.1.10 2024-09-08 21:08:20 +02:00
_2/_2ship2harkinian
_4
_6/_64gram
_9/_9base
a4/a4
a5/a52dec
aa
ab abcmidi: 2024.08.11 -> 2024.08.13 2024-09-07 22:28:35 -06:00
ac
ad ad-miner: 1.5.2 -> 1.6.0 2024-09-10 20:47:47 +00:00
ae
af
ag make age-plugin-fido2-hmac work on darwin (#339299) 2024-09-05 22:06:12 +01:00
ai aider-chat: 0.54.0 -> 0.56.0 2024-09-10 15:39:55 +02:00
al albert: move to by-name 2024-09-08 18:00:36 +01:00
am amazon-ssm-agent: 3.3.808.0 -> 3.3.859.0 2024-09-09 10:55:53 +00:00
an ansel: 0-unstable-2024-07-09 -> 0-unstable-2024-08-13 2024-09-08 09:32:26 +00:00
ao/aocl-utils
ap apt-offline: substitute --replace with --replace-fail (#337269) 2024-09-05 10:59:23 -04:00
aq/aquamarine aquamarine: 0.4.0 -> 0.4.1 2024-09-08 07:32:41 +00:00
ar
as astartectl: 23.5.2 -> 24.5.0 2024-09-10 09:53:03 +00:00
at athens: 0.14.1 -> 0.15.1 (#340700) 2024-09-09 10:52:18 +02:00
au authentik: 2024.6.1 -> 2024.6.4 (#340543) 2024-09-08 22:23:26 +01:00
av av1an: vapoursynth support (#330994) 2024-09-05 09:51:58 +05:30
aw
ax
ay tests/ayatana-indicators: Add ayatana-indicators-bluetooth 2024-09-06 11:59:46 +02:00
az
b3/b3sum
ba basedpyright: 1.17.2 -> 1.17.3 2024-09-10 03:36:32 +00:00
bc
bd
be bevelbar: 24.06 -> 24.07 (#337670) 2024-09-10 00:55:16 +02:00
bi bitwarden-cli: 2024.8.1 -> 2024.8.2 2024-09-05 15:10:37 -04:00
bk/bk
bl dotnetCorePackages.fetchNupkg: override avalonia.x11 to find native libs 2024-09-06 16:32:08 -03:00
bm
bn/bngblaster
bo boogie: 3.2.3 -> 3.2.4 (#335316) 2024-09-09 22:52:39 +02:00
bp
bq/bqn
br brainflow: 5.12.1 -> 5.13.2 (#338265) 2024-09-08 00:20:15 +02:00
bs
bt
bu
by
c-
c2
ca cameractrls: 0.6.6 -> 0.6.7 (#340933) 2024-09-10 16:37:48 +08:00
cb
cc
cd
ce
cf/cf-tool
cg
ch chawan: 0-unstable-2024-08-03 -> 0-unstable-2024-09-03 (#336480) 2024-09-09 22:18:06 +02:00
ci cirrus-cli: 0.124.2 -> 0.125.1 2024-09-08 19:14:12 +00:00
cj/cjs
cl clash-verge-rev: add meta for internal package (#340771) 2024-09-10 16:14:41 +08:00
cm
cn
co code-cursor: init at 0.40.4 (#337331) 2024-09-10 16:31:37 +08:00
cp
cq/cq
cr {cronutils,formatjson5,igvm-tooling,uplosi}: add passthru.update-script (#338136) 2024-09-09 09:11:28 +02:00
cs
ct/ctx
cu cuetsy: init at 0.1.11 (#340223) 2024-09-07 22:33:58 +08:00
cv/cvemap
cw/cwe-client-cli
cy
cz/czkawka
da
db dbeaver-bin: add webkitgkt and glib-networking for webbrowser support (#336742) 2024-09-05 19:10:29 +02:00
dc
dd
de devenv: fix build on darwin 2024-09-11 08:37:45 +01:00
dg/dgoss
dh/dhcpig
di discover-overlay: 0.7.4 -> 0.7.8 (#335033) 2024-09-09 23:57:38 +02:00
dj/djent
dm
dn
do dotenvx: 1.8.0 -> 1.14.0 (#337739) 2024-09-10 10:35:00 +09:00
dp
dr
ds
dt
du dumbpipe: 0.13.0 -> 0.16.0 2024-09-09 13:23:37 +00:00
dv/dvb-apps
dw
dx
dy dynisland: init at 0.1.3 2024-09-07 16:28:36 -06:00
e1/e1s
ea eask: Rename eask -> eask-cli 2024-09-06 02:16:03 -07:00
eb
ec
ed
ee/eepers
ef/efibootmgr
eg/eg25-manager
ei eintopf: 0.13.16 -> 0.14.1 (#336806) 2024-09-06 00:48:07 +00:00
ej/ejsonkms
ek ekho: use finalAttrs 2024-09-09 09:04:33 +00:00
el element-call: use yarnInstallHook 2024-09-04 11:15:47 -03:00
em
en envision-unwrapped: 0-unstable-2024-09-06 -> 0-unstable-2024-09-09 2024-09-09 10:17:26 +00:00
eo/eog
ep
er
es eslint: 9.9.1 -> 9.10.0 2024-09-08 12:42:49 -05:00
et
eu
ev
ew/eww
ex exificient: init at 1.0.7 2024-09-06 13:53:24 +01:00
ey/eyewitness
ez/eza eza: 0.19.1 -> 0.19.2 2024-09-05 04:34:29 +02:00
f2/f2fs-tools
fa fastcdr: 2.2.3 -> 2.2.4 2024-09-10 12:53:51 +00:00
fb/fbset
fc
fe feishin: 0.8.0 -> 0.8.1 2024-09-05 00:35:30 +01:00
ff fflogs: 8.13.1 -> 8.13.5 2024-09-09 05:48:48 +00:00
fg/fgqcanvas
fi firefly-iii-data-importer: 1.5.4 -> 1.5.5 (#339864) 2024-09-10 20:29:22 +03:00
fj/fjo
fl flameshot: 12.1.0-unstable-2024-08-02 -> 12.1.0-unstable-2024-09-01 (#339506) 2024-09-11 00:47:45 +02:00
fm
fn/fnott
fo {cronutils,formatjson5,igvm-tooling,uplosi}: add passthru.update-script (#338136) 2024-09-09 09:11:28 +02:00
fr friture: 0.49-unstable-2024-06-02 -> 0.51 2024-09-09 01:16:40 +08:00
fs
ft/fte
fu
fv
fw/fwupd
fx/fx
fy
fz
g3/g3kb-switch
ga gatus: 5.12.0 -> 5.12.1 2024-09-09 11:44:23 +00:00
gb
gc
gd
ge gearlever: 2.0.6 -> 2.0.7 2024-09-09 20:01:01 +08:00
gf
gg/gg
gh gh-markdown-preview: 1.7.0 -> 1.8.0 2024-09-10 12:59:47 +00:00
gi Merge: gitea: 1.22.1 -> 1.22.2 (#339891) 2024-09-10 17:58:49 +02:00
gk/gk-cli
gl
gm gmic: 3.4.0 -> 3.4.2 2024-09-04 19:14:52 +00:00
gn gnome-flashback: Fix mkSystemdTargetForWm eval 2024-09-07 16:40:36 +08:00
go gopls: 0.16.1 -> 0.16.2 (#341037) 2024-09-11 08:11:13 -04:00
gp gpu-burn: unstable-2023-11-10 -> unstable-2024-04-09; update CUDA packaging 2024-09-05 21:36:41 +00:00
gr graphite-cli: 1.4.3 -> 1.4.4 2024-09-06 09:49:47 +00:00
gt
gu
gv/gvisor
gx/gxml
h2/h2
h5/h5utils
h8/h8mail
ha hadolint-sarif: 0.6.5 -> 0.6.6 (#340004) 2024-09-07 09:53:43 -04:00
hb/hb-honeypot
hc/hclfmt
hd hdr10plus_tool: init at 1.6.0 2024-09-05 19:17:21 +05:30
he heptabase: 1.35.5 -> 1.37.0 2024-09-08 11:00:09 +00:00
hi
hj/hjson-go
hn/hn-text
ho home-manager: 0-unstable-2024-08-23 -> 0-unstable-2024-09-09 2024-09-09 20:03:44 +00:00
hp
ht httm: 0.42.0 -> 0.42.4 2024-09-04 17:07:14 +00:00
hu
hv/hvm
hw/hwinfo
hx/hxtools
hy hydra: improve structuredAttrs support (#340840) 2024-09-10 00:06:09 +03:00
i2/i2p
i3
ia
ic
id
if
ig igir: 2.9.2 -> 2.11.0 (#329391) 2024-09-09 23:11:12 +02:00
ii
ij
im
in Merge master into staging-next 2024-09-09 12:05:58 +00:00
io iotools: Format package.nix 2024-09-07 02:42:49 +02:00
ip
ir
is
it
iu/iucode-tool iucode-tool: Move package file into by-name structure 2024-09-07 22:56:04 +02:00
iv
iw/iw
iz/izrss
ja
jc/jcli
jd/jdt-language-server
je
ji
jj/jj
jn
jo
jq/jq-zsh-plugin
jr
js
jt/jtdx
ju Merge master into staging-next 2024-09-05 18:03:49 +00:00
jw/jwasm
k8/k8s-manifest-sigstore
ka kazv: init at 0.5.0 (#334844) 2024-09-06 16:05:45 +08:00
kc
kd
ke keypunch: 1.0 -> 3.1 2024-09-09 20:39:58 +08:00
kg/kgeotag
ki kitex: 0.10.3 -> 0.11.0 2024-09-09 17:25:58 +00:00
kl
km
kn dotnetCorePackages.fetchNupkg: override avalonia.x11 to find native libs 2024-09-06 16:32:08 -03:00
ko kokkos: 4.3.01 -> 4.4.00 (#335928) 2024-09-09 22:39:45 +02:00
kp/kplex
kr
ks
kt
ku
kv/kvmarwaita
kx
ky
la lazygit: 0.43.1 -> 0.44.0 2024-09-07 11:54:02 +03:00
lb
lc
ld
le lefthook: 1.7.14 -> 1.7.15 2024-09-09 19:26:26 +00:00
lg/lgogdownloader
li libbase58: init at 0.1.4 (#340834) 2024-09-11 01:24:37 +02:00
lk/lk-jwt-service
ll llama-cpp: 3645 -> 3672 2024-09-06 04:58:14 +00:00
lm lms: 3.51.1 -> 3.56.0 (#337650) 2024-09-05 10:52:02 -04:00
ln/lngen
lo
lp
lr/lrcget
ls
lt/ltris
lu lutgen: 0.10.1 -> 0.11.0 (#340142) 2024-09-07 21:54:51 -04:00
lv/lv_font_conv
lw/lwgrp
lx lxgw-wenkai-screen: init at version 1.330 2024-09-06 19:45:36 -04:00
lz
m1/m1ddc
m2
ma marwaita-mint: 20.3.1 -> 21 2024-09-10 08:19:25 +00:00
mb
mc
md
me melonDS: 0.9.5-unstable-2024-08-21 -> 0.9.5-unstable-2024-09-06 (#340730) 2024-09-10 12:12:13 +00:00
mf
mg
mi microcode-intel: 20240813 -> 20240910 2024-09-10 21:21:46 +02:00
mk
ml/mlx42
mo mouse-actions-gui: 0.4.4 -> 0.4.5 (#340844) 2024-09-10 20:32:54 +03:00
mp mpris-notifier: 0.1.7 -> 0.1.9 2024-09-10 01:17:16 +00:00
mq
mr/mricron
ms
mu museum: photos-v0.9.30 -> photos-v0.9.35 (#340195) 2024-09-08 18:23:31 -04:00
my mystmd: 1.3.4 -> 1.3.6 2024-09-05 06:15:47 +00:00
n2/n2
n8/n8n n8n: drop myself from maintainers 2024-09-11 12:58:24 +03:00
n9/n98-magerun2
na
nb
nc nc4nix: 0-unstable-2024-08-01 -> 0-unstable-2024-09-07 2024-09-07 09:30:15 +00:00
nd/ndstrim
ne dotnetCorePackages.fetchNupkg: override avalonia.x11 to find native libs 2024-09-06 16:32:08 -03:00
nf
ng
nh nhost-cli: 1.23.0 -> 1.24.0 2024-09-08 06:07:27 +00:00
ni nitrokey-fido2-firmware: init at 2.4.1 (#337951) 2024-09-10 16:21:18 +02:00
nl
nm
nn nncp: 8.10.0 -> 8.11.0 2024-09-09 18:13:56 +00:00
no notation: 1.1.1 -> 1.2.0 (#338121) 2024-09-07 19:58:44 +02:00
np
nr
ns
nt
nu
nv
nw nwg-clipman: init at 0.2.3 (#326392) 2024-09-09 12:23:41 +08:00
nx/nxengine-evo
nz
oa
ob
oc
od
oe/oelint-adv oelint-adv: 5.7.2 -> 6.0.0 2024-09-08 11:00:14 +00:00
of offat: relax setuptools 2024-09-06 10:28:21 +02:00
oh oh-my-posh: 23.4.0 -> 23.12.0 2024-09-10 12:45:41 +00:00
oi oidc-agent: 5.2.0 -> 5.2.1 2024-09-04 15:55:16 +00:00
ok okteto: 2.30.2 -> 2.31.0 2024-09-06 01:28:27 +00:00
ol
om omekasy: 1.2.3 -> 1.3.1 2024-09-09 14:37:23 +00:00
on onedrivegui: format with nixfmt 2024-09-04 18:17:37 +01:00
oo
op Merge master into staging-next 2024-09-09 00:14:38 +00:00
oq/oqs-provider
or orchard: 0.22.1 -> 0.23.0 2024-09-06 01:27:44 +00:00
os oscavmgr: init at 0.4.1 (#339627) 2024-09-09 19:17:00 +02:00
ot
ou
ov
ow
pa paup: init at 4.0a169 2024-09-04 10:52:44 -07:00
pc
pd
pe
pf/pfft
pg
ph photini: fix by using pyside6 (#332006) 2024-09-09 18:42:09 +02:00
pi picom-pijulius: 8.2-unstable-2024-08-30 -> 8.2-unstable-2024-09-08 2024-09-08 16:38:22 +00:00
pk
pl plasmusic-toolbar: 1.5.0 -> 1.6.0 2024-09-05 07:54:33 +00:00
pm pmtiles: add geospatial team as maintainer 2024-09-06 08:41:37 +02:00
pn
po poethepoet: 0.27.0 -> 0.28.0 2024-09-07 11:04:00 +00:00
pp/ppsspp
pq
pr proton-ge-bin: GE-Proton9-12 -> GE-Proton9-13 2024-09-10 10:41:44 +00:00
ps
pt
pu pupdate: 3.12.0 -> 3.13.0 2024-09-06 20:35:40 +00:00
pv
pw
px/pxder
py
pz/pzip
qa/qadwaitadecorations
qb/qbittorrent-enhanced
qc/qcm
qd
qg/qgrep
qm/qmplay2
qn/qnial
qo/qodem
qp/qpoases
qq/qq qq: 3.2.12-2024.8.19 -> 3.2.12-2024.9.2 2024-09-06 06:24:14 +00:00
qr Revert "qrtool: switch to GitLab source" 2024-09-06 16:59:10 -07:00
qs
qt qtalarm: init at 2.5.1 (#337732) 2024-09-10 22:12:09 +08:00
qu quarkus: 3.14.1 -> 3.14.2 2024-09-09 01:20:17 +00:00
qw/qwerty-fr
r0/r0vm
r1/r10k
ra radicle-node: 1.0.0-rc.17 → 1.0.0 2024-09-10 13:54:51 +02:00
rc rcu: disable build on hydra 2024-09-05 21:36:28 +03:00
rd/rdwatool
re recyclarr: 7.2.1 -> 7.2.3 (#328437) 2024-09-10 20:59:15 +02:00
rf/rfdump
rh/rHttp
ri
rk
rl/rl_json
rm
rn
ro roddhjav-apparmor-rules: 0-unstable-2024-08-30 -> 0-unstable-2024-09-08 (#340561) 2024-09-11 15:34:52 +05:30
rp/rpcs3 rpcs3: 0.0.32-16875-3b36df48e -> 0.0.33-16892-7e3b8b5cd 2024-09-04 18:23:35 +00:00
rq
rr/rrdtool
rs
rt rtorrent: 0.9.8-unstable-2024-08-20 -> 0.9.8-unstable-2024-08-31 2024-09-05 10:52:17 +00:00
ru rustic: 0.8.0 -> 0.8.1 2024-09-10 13:08:26 +00:00
rw/rwpspread
ry dotnetCorePackages.fetchNupkg: override avalonia.x11 to find native libs 2024-09-06 16:32:08 -03:00
s0/s0ix-selftest-tool
s3 s3scanner: 3.0.4 -> 3.1.0 2024-09-09 02:33:43 +00:00
sa sarif-fmt: 0.6.5 -> 0.6.6 2024-09-06 07:04:30 +00:00
sb sby: 0.44 -> 0.45 (#340966) 2024-09-10 12:13:16 +00:00
sc Merge master into staging-next 2024-09-09 14:31:17 +00:00
sd SDL1: lib.optionals instead of lib.optional 2024-09-04 16:40:57 -03:00
se serpl: 0.1.34 -> 0.3.3 2024-09-08 22:41:37 +08:00
sf sfcgal: init at 1.5.2 2024-09-04 18:09:58 +03:00
sg/sgfutils
sh shpool: 0.6.3 -> 0.7.0 (#339300) 2024-09-09 23:15:57 +08:00
si sirius: 7.6.0 -> 7.6.1 2024-09-10 02:45:25 +00:00
sk
sl
sm
sn snphost: 0.4.0 -> 0.5.0 2024-09-10 15:12:22 +02:00
so so: fix build 2024-09-08 11:23:35 -04:00
sp sploitscan: 0.10.5 -> 0.11.0 2024-09-09 22:25:35 +00:00
sq sqlitestudio: init at 3.4.4 (#336505) 2024-09-11 15:01:31 +08:00
sr srm-cuarzo: 0.7.1-1 -> 0.7.2-1 2024-09-08 02:30:34 +00:00
ss
st stalwart-mail: 0.9.3 -> 0.9.4 2024-09-09 22:25:21 +02:00
su surfer: init at v0.2.0 2024-09-10 15:56:12 +08:00
sv
sw switch-to-configuration-ng: clear environment when reexecing as user 2024-09-06 19:52:56 +03:00
sx
sy
t-/t-rex
ta
tb/tbump
tc
td tdl: 0.17.3 -> 0.17.4 2024-09-09 03:06:25 +00:00
te testlib: init at 0.9.41 (#338072) 2024-09-11 19:47:40 +08:00
tg
th thrift-ls: change binary name to mimic upstream 2024-09-10 21:32:32 +10:00
ti Merge master into staging-next 2024-09-06 18:03:54 +00:00
tk
tl
tm tmpi: remove redundant input 2024-09-05 10:13:35 +02:00
to todesk: init at 4.7.2.0 (#310474) 2024-09-10 21:42:59 +08:00
tp tparse: add ldflags 2024-09-07 02:16:16 +04:00
tr trunk-io: 1.3.1 -> 1.3.2 (#340457) 2024-09-09 09:11:18 -04:00
ts
tt
tu
tw
tx
ty
u-/u-config
ub
uc Clean up cross bootstrapping, take 2 (#321525) 2024-09-06 14:56:54 -04:00
ud
ue
ug
uh/uhttpmock_1_0
ui
um/umpire
un unl0kr: remove tomfitzhenry@ as maintainer (#333616) 2024-09-06 12:50:55 +08:00
up {cronutils,formatjson5,igvm-tooling,uplosi}: add passthru.update-script (#338136) 2024-09-09 09:11:28 +02:00
ur/urban-cli
us userborn: limit to Linux 2024-09-10 17:29:35 +02:00
ut
uu/uuu
uv/uv uv: 0.4.7 -> 0.4.8 2024-09-10 10:41:16 +00:00
uw
ux
va
vc
vd/vdhcoapp
ve vencord: 1.9.5 -> 1.10.1 (#332423) 2024-09-07 20:20:59 +00:00
vf/vfkit
vg
vi vimcats: 1.0.2 -> 1.1.0 2024-09-04 19:28:53 +02:00
vk
vl
vm
vn
vo
vp vpsfree-client: 0.18.0 -> 0.19.0 (#339850) 2024-09-05 23:57:13 +02:00
vr/vrcadvert vrcadvert: init at 1.0.0 2024-09-05 17:49:32 +02:00
vs vscode-js-debug: 1.91.0 -> 1.93.0 (#332398) 2024-09-09 23:49:58 +02:00
vu Merge master into staging-next 2024-09-06 12:05:08 +00:00
vv/vvvvvv
vw/vwsfriend
vz/vzic
wa warp-terminal: 0.2024.08.20.08.02.stable_00 -> 0.2024.09.03.08.02.stable_03 (#340319) 2024-09-11 15:17:06 +05:30
wb
wc/wcurl
we weblate: 5.7.1 -> 5.7.2 2024-09-05 13:18:14 +02:00
wf/wf-touch
wg/wg-access-server
wh when-cli: init at 0.4.0 2024-09-10 08:53:13 +00:00
wi wit-bindgen: 0.30.0 -> 0.31.0 2024-09-10 02:58:18 +00:00
wl
wo
wp
wr/wrangler
ws wstunnel: 10.1.0 - 10.1.1 2024-09-04 15:33:05 +02:00
wt
wu/wush wush: init at 0.1.2 2024-09-05 09:15:17 +05:30
wv
wx/wxc
wy/wyoming-satellite
x1/x16
x5/x509-limbo
xa
xc
xd
xe
xf/xfs-undelete
xh/xhosts
xi xine-ui: nixfmt-rfc-style 2024-09-10 11:52:32 -03:00
xl
xm
xn/xnlinkfinder
xo
xp
xr
xs
xt/xtf xtf: 0-unstable-2024-07-25 -> 0-unstable-2024-08-30 2024-09-09 13:27:21 +00:00
xu/xunit-viewer
xv/xviewer
xw
ya yandex-music: 5.14.0 -> 5.15.0 (#340968) 2024-09-10 10:45:09 +00:00
yc/ycmd
yd/ydotool
ye
yg
yj/yj
yo yourkit-java: 2024.3-b157 -> 2024.3-b161 2024-09-06 06:50:12 +00:00
yp/ypbind-mt
ys/ysfx
yt
yu
za
zb/zbus-xmlgen
zc
ze zed-editor: 0.151.2 -> 0.152.3 2024-09-10 15:54:47 -04:00
zf/zfind
zi zigpy-cli: use buildPythonApplication 2024-09-04 12:02:07 -07:00
zl/zluda
zm/zmkBATx
zo zoom-us: move to by-name (#339851) 2024-09-11 10:07:50 +02:00
zp
zs zsh-wd: 0.7.1 -> 0.8.0 2024-09-10 16:18:24 +00:00
zu
zw/zwave-js-server zwave-js-server: 1.36.0 -> 1.38.0 2024-09-05 04:07:41 +00:00
zx
README.md pkgs/by-name: Update manual migration guidelines 2024-09-07 03:59:47 +02:00

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. 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 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, 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-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;
}