nixpkgs/pkgs/by-name
2024-09-17 06:34:08 +00:00
..
_0/_0xpropo
_1/_1fps _1fps: init at 0.1.10 2024-09-08 21:08:20 +02:00
_2/_2ship2harkinian
_4
_6/_64gram _64gram: 1.1.34 -> 1.1.39 2024-09-15 04:14:25 +00:00
_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
ai aider-chat: fix build 2024-09-14 02:53:48 -04:00
al aldente: 1.27.3 -> 1.28.2 (#339881) 2024-09-13 23:24:04 +04:00
am amdvlk: sha256hash 2024-09-17 06:34:07 +00:00
an maintainers: remove eclairevoyant 2024-09-10 15:02:41 -04:00
ao/aocl-utils
ap
aq/aquamarine aquamarine: 0.4.0 -> 0.4.1 2024-09-08 07:32:41 +00:00
ar
as astartectl: remove no longer needed version override 2024-09-11 14:12:16 +02:00
at athens: 0.14.1 -> 0.15.1 (#340700) 2024-09-09 10:52:18 +02:00
au auto-changelog: 2.4.0 -> 2.5.0 2024-09-12 08:47:15 +02:00
av
aw
ax
ay
az
b3/b3sum
ba bant: make compile again with latest bazel 2024-09-13 11:08:44 -07:00
bc
bd
be beeper-bridge-manager: fix styling and typo 2024-09-11 14:24:17 -06:00
bi binary: 4.0 -> 5.0 2024-09-13 23:11:00 -04:00
bk/bk
bl bleep: init at 0.0.7 (#321599) 2024-09-14 16:20:49 +08:00
bm bmake: 20240722 -> 20240808 2024-09-12 22:16:21 -03:00
bn/bngblaster
bo bozohttpd: rewrite expression 2024-09-12 22:16:22 -03:00
bp
bq/bqn
br brainflow: 5.13.2 -> 5.13.3 2024-09-11 16:52:38 +00:00
bs bs2b-lv2: init at 1.1.1 2024-09-13 12:22:22 +00:00
bt
bu buffer: 0.9.2 -> 0.9.5 2024-09-11 20:53:28 +02:00
by byedpi: init at 0.13.1 2024-09-12 11:23:37 +03:00
c-
c2
ca calligraphy: init at 1.0.1 (#341777) 2024-09-15 09:53:00 +08:00
cb
cc
cd
ce ceph-csi: 3.11.0 -> 3.12.1 (#336971) 2024-09-14 12:28:20 +02:00
cf/cf-tool
cg
ch treewide: adopt some unmaintained GTK packages (#341829) 2024-09-14 19:43:30 +05:30
ci cimg, gmic-qt: 3.4.0 -> 3.4.2 (#340848) 2024-09-12 19:09:59 -04:00
cj/cjs
cl clever-tools: 3.8.2 -> 3.8.3 2024-09-13 16:51:29 +00:00
cm
cn cntb: 1.4.8 -> 1.4.12 2024-09-12 15:52:11 +02:00
co concord: 2.2.1 -> 2.3.0 (#341697) 2024-09-14 11:27:56 +00:00
cp
cq/cq
cr crystal-dock: 2.2 -> 2.3 2024-09-14 12:56:06 +00: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 darktable: move to pkgs/by-name (#341144) 2024-09-12 10:24:07 +08:00
db
dc
dd
de treewide: remove executable bit from .nix files 2024-09-14 13:08:57 +02:00
dg/dgoss
dh/dhcpig
di Merge #340996: dissent 0.0.27 -> 0.0.30 2024-09-12 13:32:49 +00:00
dj/djent
dm
dn
do treewide: adopt some unmaintained GTK packages (#341829) 2024-09-14 19:43:30 +05:30
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
eb
ec
ed
ee/eepers
ef/efibootmgr
eg/eg25-manager
ei eigenrand: init at 0.5.1 2024-09-12 11:06:33 +02:00
ej/ejsonkms
ek ekho: use finalAttrs 2024-09-09 09:04:33 +00:00
el
em
en en-croissant: init at 0.11.1 2024-09-13 00:41:31 +02: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 maintainers: remove eclairevoyant 2024-09-10 15:02:41 -04:00
ex
ey/eyewitness
ez/eza eza: 0.19.2 -> 0.19.3 2024-09-12 07:34:25 +02:00
f2/f2fs-tools
fa fastfetch: update description to match the project 2024-09-13 17:46:32 +02:00
fb/fbset
fc fcitx5-fluent: init at 0.4.0-unstable-2024-03-30 (#306534) 2024-09-14 23:07:26 +08:00
fd/fdroidserver fdroidserver: move to by-name 2024-09-13 19:55:04 +08:00
fe feishin: 0.8.1 -> 0.9.0 2024-09-11 12:59:35 +01:00
ff fflogs: 8.13.1 -> 8.13.5 2024-09-09 05:48:48 +00:00
fg/fgqcanvas
fi maintainers: remove eclairevoyant 2024-09-10 15:02:41 -04:00
fj/fjo
fl flarectl: 0.103.0 -> 0.104.0 2024-09-13 22:42:51 +00:00
fm
fn/fnott maintainers: remove eclairevoyant 2024-09-10 15:02:41 -04:00
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 gate: 0.39.3 -> 0.40.0 2024-09-14 01:12:37 +00:00
gb
gc
gd
ge gemmi: 0.6.6 -> 0.6.7 (#340244) 2024-09-13 12:04:44 +09:00
gf gcc49, gcc49Stdenv, gfortran49: remove old implementation 2024-09-12 10:32:19 +01:00
gg/gg
gh gh-markdown-preview: 1.7.0 -> 1.8.0 2024-09-10 12:59:47 +00:00
gi git-spice: 0.4.0 -> 0.5.2 (#341276) 2024-09-14 04:08:39 +02:00
gk/gk-cli
gl glance: 0.5.1 -> 0.6.0 (#340545) 2024-09-13 15:17:38 +00:00
gm gmic-qt: 3.4.0 -> 3.4.2 2024-09-09 19:19:14 +00:00
gn treewide: adopt some unmaintained GTK packages 2024-09-14 21:07:29 +08:00
go gossip: add missing dependencies (#341182) 2024-09-15 17:24:43 +08:00
gp
gr graphicsmagick: add heif support 2024-09-11 22:50:33 +08:00
gt gtimelog: unstable-2023-10-05 -> 0.12.0 (#331219) 2024-09-12 15:53:53 +02:00
gu
gv/gvisor
gx/gxml
gz/gzdoom gzdoom: add myself as maintainer 2024-09-12 22:52:41 +02:00
h2/h2
h5/h5utils
h8/h8mail
ha maintainers: remove eclairevoyant (#341075) 2024-09-11 22:24:23 +02:00
hb/hb-honeypot
hc/hclfmt
hd treewide: remove executable bit from .nix files 2024-09-14 13:08:57 +02:00
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.4 -> 0.43.0 2024-09-15 04:58:55 +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 i3bar-river: 0.1.9 -> 0.1.10 2024-09-08 01:02:24 +00:00
ia
ic
id
if
ig ignite-cli: 28.5.1 -> 28.5.2 2024-09-13 08:55:55 +00: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 jellyfin: 10.9.10 -> 10.9.11 2024-09-12 09:27:31 +00:00
ji
jj/jj
jn
jo jogger: init at 1.2.4-unstable-2024-04-05 2024-09-11 20:29:59 +08:00
jq/jq-zsh-plugin
jr
js
jt/jtdx
ju
jw/jwasm jwasm: fix install path 2024-09-09 20:43:06 +02:00
k8/k8s-manifest-sigstore
ka
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 kulala-fmt: 1.3.1 -> 1.3.2 2024-09-14 01:34:49 +00:00
kv/kvmarwaita
kw/kwok kwok: init at 0.6.0 2024-09-10 21:26:27 +08:00
kx
ky
la lacus: format with nixfmt 2024-09-14 10:20:32 +02:00
lb
lc
ld
le lefthook: 1.7.14 -> 1.7.15 2024-09-09 19:26:26 +00:00
lg/lgogdownloader
li libresplit: init at 0-unstable-2024-06-05 (#341396) 2024-09-14 16:22:53 +08:00
lk/lk-jwt-service
ll
lm
ln/lngen
lo louvre: add update script 2024-09-12 10:04:46 +05:30
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-neoxihei: 1.202 -> 1.205 2024-09-14 09:21:19 +00:00
lz treewide: follow editorconfig 2024-09-13 18:17:51 +03:00
m1/m1ddc
m2
ma materialgram: 5.4.1.1 -> 5.5.4.1 (#341458) 2024-09-14 17:40:51 +03:00
mb
mc
md
me media-downloader: 5.0.1 -> 5.1.0 (#339870) 2024-09-14 10:23:25 +09:00
mf
mg
mi miracle-wm: 0.3.2 -> 0.3.5 (#338386) 2024-09-12 22:06:21 +02:00
mk
ml/mlx42
mo mountpoint-s3: 1.8.0 -> 1.9.0 (#341620) 2024-09-14 05:03:04 +00:00
mp mpris-notifier: 0.1.7 -> 0.1.9 2024-09-10 01:17:16 +00:00
mq
mr/mricron
ms
mu musicpod: init at 1.11.0 (#341359) 2024-09-14 00:32:22 +02:00
my treewide: remove executable bit from .nix files 2024-09-14 13:08:57 +02: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 netbird-dashboard: 2.3.0 -> 2.5.0 (#332186) 2024-09-11 17:44:17 +02:00
nf
ng
nh nhost-cli: 1.23.0 -> 1.24.0 2024-09-08 06:07:27 +00:00
ni nixos-facter: init at 0.1.0 (#341603) 2024-09-14 20:40:53 +02:00
nl
nm
nn nncp: 8.10.0 -> 8.11.0 2024-09-09 18:13:56 +00:00
no nom: 2.6.0 -> 2.6.1 2024-09-12 09:24:42 +02:00
np
nr treewide: remove executable bit from .nix files 2024-09-14 13:08:57 +02:00
ns
nt
nu nuclei-templates: 9.9.4 -> 10.0.0 2024-09-14 02:26:06 +00:00
nv
nw nwg-clipman: init at 0.2.3 (#326392) 2024-09-09 12:23:41 +08:00
nx/nxengine-evo
nz
oa
ob obs-cmd: 0.17.7 -> 0.17.8 2024-09-14 01:52:43 +00:00
oc octoscan: init at 0-unstable-2024-08-25 2024-09-14 16:01:38 +02:00
od
oe/oelint-adv oelint-adv: 5.7.2 -> 6.0.0 2024-09-08 11:00:14 +00:00
of
oh oh-my-posh: 23.4.0 -> 23.12.0 2024-09-10 12:45:41 +00:00
oi
ok
ol ollama: apply llama.cpp patches in postPatch 2024-09-12 07:27:07 +00:00
om omekasy: 1.2.3 -> 1.3.1 2024-09-09 14:37:23 +00:00
on
oo
op openvas-scanner: 23.8.5 -> 23.9.0 2024-09-15 02:03:12 +00:00
oq/oqs-provider
or
os oscavmgr: init at 0.4.1 (#339627) 2024-09-09 19:17:00 +02:00
ot
ou
ov
ow
pa papers: Make thumbnailer file point to absolute path (#340625) 2024-09-15 02:43:59 +02:00
pc pcsx2: 2.1.102 -> 2.1.127 2024-09-11 11:48:41 -03:00
pd pdns-recursor: 5.0.6 -> 5.1.1 2024-09-14 13:42:20 +02:00
pe perf_data_converter: sha256hash 2024-09-17 06:34:07 +00:00
pf/pfft
pg pg-gvm: fix build 2024-09-11 00:11:00 +02:00
ph photini: fix by using pyside6 (#332006) 2024-09-09 18:42:09 +02:00
pi picocrypt: 1.42 -> 1.43 (#341419) 2024-09-14 04:04:32 +02:00
pk
pl
pm
pn
po poethepoet: 0.27.0 -> 0.28.0 2024-09-07 11:04:00 +00:00
pp/ppsspp
pq
pr protoc-gen-js: sha256hash 2024-09-17 06:34:08 +00:00
ps
pt
pu pulumi-esc: 0.9.1 -> 0.10.0 2024-09-13 07:14:24 +00:00
pv
pw
px/pxder
py pyright: 1.1.378 -> 1.1.380 2024-09-14 03:37:17 +00:00
pz/pzip
qa/qadwaitadecorations
qb/qbittorrent-enhanced
qc/qcm
qd
qg qgroundcontrol: switch to using libsForQt5 2024-09-13 16:02:00 -07:00
qm/qmplay2
qn/qnial
qo/qodem
qp/qpoases
qq/qq
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 railway: 3.13.0 -> 3.14.0 (#341669) 2024-09-14 01:06:53 +00:00
rc
rd/rdwatool
re recyclarr: 7.2.1 -> 7.2.3 (#328437) 2024-09-10 20:59:15 +02:00
rf/rfdump
rh/rHttp
ri maintainers: remove eclairevoyant 2024-09-10 15:02:41 -04:00
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 rpi-imager: migrate to pkgs/by-name and reformat with nixfmt-rfc-style 2024-09-12 20:04:09 +02:00
rq
rr/rrdtool
rs
rt rtlamr: init at 0.9.3-unstable-2023-08-13 2024-09-11 14:58:31 +02:00
ru rustic: 0.8.0 -> 0.8.1 2024-09-10 13:08:26 +00:00
rw/rwpspread
ry ryujinx: 1.1.1382 -> 1.1.1385 2024-09-08 01:57:30 +00:00
s0/s0ix-selftest-tool
s3 s3scanner: 3.0.4 -> 3.1.0 2024-09-09 02:33:43 +00:00
sa sauerbraten: 2020-12-27 -> 2020-12-29 (#341224) 2024-09-12 17:11:21 +00:00
sb sby: 0.44 -> 0.45 (#340966) 2024-09-10 12:13:16 +00:00
sc scotch: 7.0.4 -> 7.0.5 (#337565) 2024-09-13 02:47:32 +02:00
sd
se serpl: 0.1.34 -> 0.3.3 2024-09-08 22:41:37 +08:00
sf
sg/sgfutils
sh shpool: 0.6.3 -> 0.7.0 (#339300) 2024-09-09 23:15:57 +08:00
si sink-rotate: 1.0.4 -> 2.2.0 (#326469) 2024-09-13 11:47:46 +02:00
sk
sl slumber: 1.8.1 -> 2.0.0 2024-09-08 02:32:13 +00:00
sm smuxi: ensure makeWrapper is restricted to nativeBuildInputs 2024-09-13 12:01:11 +02:00
sn snips-sh: init at 0.4.0 (#341494) 2024-09-15 10:37:14 +08:00
so maintainers: remove eclairevoyant 2024-09-10 15:02:41 -04:00
sp spacedrive: 0.3.1 -> 0.4.2 (#340739) 2024-09-12 19:11:30 -04: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 sshesame: 0.0.38 -> 0.0.39 (#332647) 2024-09-12 22:39:14 +02:00
st stevenblack-blocklist: 3.14.104 -> 3.14.107 2024-09-15 06:07:33 +00:00
su surrealdb: 1.5.4 -> 1.5.5 2024-09-12 21:32:40 +02:00
sv svelte-language-server: 0.16.14 -> 0.17.0 2024-09-08 13:14:28 +00:00
sw swaylock: 1.7.2 -> 1.8.0 (#336925) 2024-09-12 23:58:52 +02:00
sx
sy systemctl-tui: 0.3.7 -> 0.3.8 2024-09-14 16:36:23 +02:00
t-/t-rex
ta
tb/tbump
tc
td tdl: 0.17.3 -> 0.17.4 2024-09-09 03:06:25 +00:00
te telegraf: 1.31.3 -> 1.32.0 2024-09-13 17:12:21 +10: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
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 twitch-dl: 2.9.1 -> 2.9.2 2024-09-12 17:47:45 +02:00
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 treewide: remove executable bit from .nix files 2024-09-14 13:08:57 +02: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 treewide: remove executable bit from .nix files 2024-09-14 13:08:57 +02:00
uv/uv uv: 0.4.8 -> 0.4.10 2024-09-15 10:14:29 +02:00
uw
ux
va vapoursynth-mvtools: move to by-name and reformat 2024-09-14 14:01:08 +02:00
vc
vd/vdhcoapp
ve verible: sha256hash 2024-09-17 06:34:08 +00:00
vf/vfkit
vg
vi
vk
vl
vm
vn
vo
vp
vr/vrcadvert
vs vscode-js-debug: 1.91.0 -> 1.93.0 (#332398) 2024-09-09 23:49:58 +02:00
vu vue-language-server: 2.1.2 -> 2.1.6 (#340358) 2024-09-14 12:20:09 +02:00
vv/vvvvvv
vw/vwsfriend
vz/vzic
wa wakatime-cli: 1.98.3 -> 1.98.5 2024-09-14 18:59:39 +00:00
wb
wc/wcurl
we weaver: init at 0.9.2 (#340922) 2024-09-14 14:05:04 +08:00
wf/wf-touch
wg/wg-access-server
wh whatsie: init at 4.15.5 (#333700) 2024-09-14 19:26:28 +08:00
wi wit-bindgen: 0.30.0 -> 0.31.0 2024-09-10 02:58:18 +00:00
wl
wo
wp
wr/wrangler
ws
wt
wu/wush wush: 0.1.2 -> 0.2.1 2024-09-13 04:58:20 +00:00
wv
wx/wxc
wy/wyoming-satellite
x1/x16 x16-emulator: 47 -> 48 (#340147) 2024-09-11 12:54:03 -04:00
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-cloud: 0.132.1 -> 0.133.0 2024-09-14 19:42:23 +00:00
yc/ycmd
yd/ydotool
ye
yg
yj/yj
yo you-have-mail-cli: init at 0.3.0 (#334403) 2024-09-14 23:29:12 +08: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
zl/zluda
zm/zmkBATx
zo zoekt: unstable-2022-11-09 -> 0-unstable-2024-09-05 2024-09-13 11:03:24 -05:00
zp
zs zsh-wd: 0.7.1 -> 0.8.0 2024-09-10 16:18:24 +00:00
zu
zw/zwave-js-server
zx
README.md pkgs/by-name/README.md: use more precise wording on package name 2024-09-12 08:11:03 +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 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 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;
}