1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00
nixpkgs/pkgs/by-name
2024-04-04 13:45:35 +02:00
..
_4/_4th
_6/_64gram _64gram: fix uppercase letter in pname 2024-04-03 23:51:35 +08:00
_9/_9base
a4/a4
a5/a52dec
aa
ab/aba
ac
ad adwsteamgtk: 0.6.9 -> 0.6.10 2024-03-30 02:17:10 +00:00
ae
af affine: init at 0.13.1 2024-03-25 09:02:26 +08:00
ag/ags
ai
al
am
an
ao/aocl-utils
ap Merge pull request #293890 from sarcasticadmin/init-aprx 2024-03-30 23:29:44 +01:00
ar Merge pull request #296826 from NotAShelf/bump-arrpc 2024-03-22 00:35:36 +01:00
as ast-grep: 0.20.0 -> 0.20.2 2024-04-02 07:04:04 +00:00
at athens: 0.13.1 -> 0.13.2 2024-04-02 14:50:47 +02:00
au autoAddDriverRunpathHook: init 2024-03-30 10:14:14 -07:00
av
aw aws-workspaces: 4.6.0.4187 -> 4.7.0.4312 2024-03-26 11:00:20 +01:00
ax/axmldec
ay
ba bat: skip file_with_invalid_utf8_filename test 2024-04-01 22:45:34 -05:00
bc/bc-ur
be bee: fix version 2024-04-01 19:35:50 +02:00
bi Merge pull request #261532 from eclairevoyant/bibata-cursors 2024-03-25 16:43:36 +01:00
bk/bk
bl blueutil: init at 2.9.1 2024-03-25 01:16:01 +08:00
bm/bmake
bn/bngblaster
bo boxbuddy: 2.1.5 -> 2.2.0 2024-04-01 10:49:28 +08:00
bp/bpftop bpftop: 0.3.0 -> 0.4.0 2024-03-27 20:10:11 +00:00
br bruno: 1.11.0 -> 1.12.2 (#298809) 2024-03-25 17:16:30 +01:00
bs/bsync
bt/bt-migrate bt-migrate: init at 0-unstable-2023-08-17 2024-03-25 18:19:38 +00:00
bu Merge pull request #276937 from t4ccer/t4/buttermanager 2024-03-29 15:42:01 -04:00
by
c-
c2
ca cano: init at 0-unstable-2024-3-31 2024-04-04 12:42:33 +02:00
cb cbtemulator: init at 1.22.0 2024-03-23 18:24:44 +01:00
cc/ccache
cd
ce
cg cgterm: init at 1.7b2 2024-03-24 13:01:00 +00:00
ch Merge pull request #298511 from a-n-n-a-l-e-e/ch341eeprom-license 2024-03-23 23:24:35 -07:00
ci
cl clash-verge-rev: 1.5.10 -> 1.5.11 2024-03-28 15:17:14 +00:00
cm
cn/cntb
co Merge pull request #300649 from RAVENz46/master 2024-04-02 21:09:14 +08:00
cp
cr crawley: 1.7.3 -> 1.7.4 2024-04-02 06:14:33 +00:00
cs csvlens: 0.7.0 -> 0.8.1 2024-03-26 15:06:22 +09:00
ct/ctx
cu cue: migrate to by-name 2024-03-29 15:49:50 -03:00
cv/cvemap cvemap: init at 0.0.6 2024-03-30 23:01:15 +01:00
cy
cz/czkawka
da Merge pull request #301274 from Ramblurr/update/davis 2024-04-03 18:29:26 -03:00
db/dbus-cpp
dc/dc3dd
dd
de dep-scan: 5.2.12 -> 5.2.14 2024-03-30 11:52:42 +01:00
dg/dgoss dgoss: move to pkgs/by-name 2024-03-25 18:49:47 +01:00
di Merge pull request #293588 from ambroisie/bt-migrate 2024-03-28 00:48:00 +01:00
dj/djent
dm dmalloc: init at 5.6.5 2024-03-23 15:40:06 +03:00
dn/dns2tcp
do dotnet-outdated: build with binary sdks 6/7/8 2024-03-30 16:55:50 -03:00
dp/dpp
dr/drone-scp
ds
dt/dtcmp
du dust: 0.9.0 -> 1.0.0 2024-03-27 09:47:35 +08:00
dv/dvb-apps
dx
dy dynamodb-local: add java.naming module for JRE 2024-03-28 21:44:09 +01:00
ea/easyeasm
eb
ec
ed
ei
ek/eksctl eksctl: 0.174.0 -> 0.175.0 2024-03-22 16:21:47 +00:00
el elasticsearch-curator: move to by-name 2024-03-24 12:11:28 +01:00
em
en
ep/epub-thumbnailer epub-thumbnailer: 0-unstable-2024-03-16 -> 0-unstable-2024-03-26 2024-04-03 13:31:55 +02:00
er
es
et ethercat: init at 1.6-alpha 2024-03-26 23:55:30 +01:00
eu
ex
ez/eza eza: 0.18.8 -> 0.18.9 2024-03-27 08:18:05 +01:00
fa fantomas: 6.3.0 -> 6.3.1 2024-04-02 11:55:44 +02:00
fb/fbset
fc
fe
ff
fi Merge pull request #297238 from quantenzitrone/fido2luks 2024-03-30 12:50:42 +01:00
fl Merge pull request #299177 from Rucadi/flatito 2024-04-03 08:38:17 +02:00
fm
fn/fnott
fo folio: 24.08 -> 24.09 2024-03-28 07:10:34 +00:00
fr freefilesync: 13.4 -> 13.5 2024-04-03 15:32:38 +02:00
fs
fu/fuchsia-cursor
fv fvwm3: refactor 2024-03-31 16:10:52 -03:00
fw/fwupd
fy/fypp
fz/fzf-make fzf-make: migrate to by-name 2024-04-03 18:05:07 +02:00
g3/g3kb-switch
ga gat: init at 0.17.0 2024-03-25 07:21:32 +03:00
gb/gbar
gc treewide: remove explicit -trimpath from Go pkgs 2024-03-28 07:57:19 +01:00
ge
gg/gg
gh Merge pull request #301263 from loicreynier/gh-f-make-standalone 2024-04-03 23:46:03 +08:00
gi Merge pull request #298087 from andersrh/upgrade-github-desktop 2024-04-01 16:16:32 +02:00
gl glas: 0.2.2 -> 0.2.3 2024-04-04 13:05:53 +05:30
gm
gn gnucap: deprecate phases 2024-03-25 21:54:08 +01:00
go Merge pull request #283654 from terrorbyte/pkg-go-bare-gen 2024-04-02 01:10:00 +02:00
gp
gr graphite-cli: 1.2.3 -> 1.2.8 2024-03-26 21:26:54 +11:00
gt treewide: remove explicit -trimpath from Go pkgs 2024-03-28 07:57:19 +01:00
gu
gx/gxml
h8/h8mail
ha Merge pull request #299869 from jtbx/halloy-2024.5 2024-03-30 10:39:42 +01:00
hd/hdrop
he Merge pull request #295594 from ShamrockLee/checkpoint-build-dontfixup 2024-04-01 10:45:30 -04:00
hi
hj/hjson-go
ho home-manager: unstable-2024-03-22 -> unstable-2024-03-31 2024-03-31 07:26:30 +00:00
ht httpdirfs: move to pkgs/by-name 2024-03-30 17:34:47 +01:00
hu/hugo hugo: 0.124.0 -> 0.124.1 2024-03-28 10:05:59 +01:00
hy hyprcursor: 0.1.4 -> 0.1.5 2024-03-24 23:22:00 +00:00
i3
ia
ic icewm: 3.4.6 -> 3.4.7 2024-03-26 01:39:44 +00:00
id ida-free: init at 8.4.240320 2024-03-31 13:11:49 +02:00
if/ifrextractor-rs
ig igir: 2.5.2 -> 2.6.0 2024-03-23 15:09:51 +00:00
ii
im
in incus.ui: 0.6 -> 0.7 2024-04-03 20:46:12 +02:00
io/ioq3-scion
ip
ir/ironbar
it itsycal: init at 0.15.3 2024-03-27 16:55:52 +02:00
ja jan: 0.4.9 -> 0.4.10 2024-04-02 13:04:25 +00:00
jd/jdt-language-server
je jetbrains-toolbox: move to pkgs/by-name 2024-04-02 21:15:08 +02:00
ji
jj/jj
jn jnv: 0.1.3 -> 0.2.1 2024-04-02 07:04:14 +00:00
jo Merge pull request #294017 from fgaz/job-security/init 2024-03-27 10:47:59 +01:00
js/jsoncons
ju
ka
kc
kd/kdsingleapplication
ke
kg/kgeotag
ki
kl/klog-time-tracker klog-time-tracker: 6.2 -> 6.3 2024-03-23 22:43:54 +00:00
km Merge pull request #292303 from Vinetos/add-kmeet 2024-03-29 10:07:56 +01:00
kn/knossosnet
ko kor: 0.3.6 -> 0.3.7 2024-03-25 01:40:25 +00:00
kp/kplex
kr
ks kshutdown: init at 5.91-beta 2024-04-02 11:39:56 -07:00
kt
ku
kx/kxstitch
ky/kyverno-chainsaw
la labwc-tweaks: unstable-2024-01-04 -> unstable-2024-04-02 2024-04-04 09:35:22 +00:00
lb
lc/lcab
le lexical: init at 0.5.2 2024-04-02 09:31:24 +02:00
li Merge pull request #300271 from devhell/bump-mediainfo 2024-04-04 04:29:18 +08:00
ll llama-cpp: use pkgs.autoAddDriverRunpath 2024-03-31 10:15:47 -07:00
lm/lmstudio lmstudio: init at 0.2.18 2024-03-28 19:30:20 +01:00
ln/lngen
lo local-ai: add whisper test 2024-04-01 17:07:41 +02:00
lp
ls
lt/ltris
lu lubelogger: 1.2.8 -> 1.2.9 2024-03-29 15:09:18 +00:00
lw/lwgrp
lx lxd: rename to lxd-lts 2024-04-02 19:35:44 -04:00
lz
m2
ma Merge pull request #300501 from fabaff/malwoverview 2024-04-03 22:27:12 +02:00
mb/mbpoll
mc
md
me Merge pull request #300271 from devhell/bump-mediainfo 2024-04-04 04:29:18 +08:00
mf
mg/mgitstatus
mi minijinja: 1.0.15 -> 1.0.16 2024-04-03 04:15:54 +00:00
mk
ml/mlx42
mo Merge pull request #278981 from dotlambda/mollysocket-init 2024-03-28 18:51:07 +00:00
mp/mpifileutils
mq
ms
mu
my mycelium: 0.4.5 -> 0.5.0 2024-04-04 12:44:23 +03:00
n2/n2
na namespace-cli: 0.0.351 -> 0.0.352 2024-03-28 02:38:54 +00:00
nb/nbtscan
nc
nd/ndstrim
ne Merge pull request #298517 from ByteSudoer/init-nerdfetch 2024-04-02 00:04:24 +08:00
nf/nfft
nh
ni nim_lk: 20231031 -> 20240210 2024-04-02 08:59:07 +00:00
nl
nm/nmap-parse
nn/nncp nncp: fix build 2024-03-24 09:28:39 +01:00
no Merge pull request #295935 from Aleksanaa/notify 2024-03-26 02:35:03 +01:00
np
nr
ns
nt/ntfs2btrfs ntfs2btrfs: init at 20240115 2024-03-24 17:01:38 +07:00
nu nuclei-templates: init at 9.8.0 2024-03-31 13:29:20 +02:00
nv nvidia-container-toolkit: use autoAddDriverRunpath 2024-03-30 10:14:14 -07:00
nw Merge pull request #298702 from r-ryantm/auto-update/nwg-hello 2024-03-26 08:59:52 -04:00
oa
ob obs-cmd: 0.17.4 -> 0.17.5 2024-03-26 14:27:43 +00:00
oc nixos/ocis: init at 5.0.0 2024-04-03 00:53:24 +05:30
oe/oelint-adv oelint-adv: 4.4.4 -> 4.4.5 2024-03-23 00:10:55 +00:00
of offat: init at 0.16.0 2024-04-01 21:03:18 +02:00
oh/oh-my-fish
oi
ol/olvid
om/omniorbpy omniorbpy: init at 4.3.2 2024-03-25 09:50:19 +01:00
on Merge master into staging-next 2024-03-31 12:01:07 +00:00
op opcua-commander: init at 0.37.0 2024-03-23 13:17:53 +01:00
or orchard: 0.15.1 -> 0.15.2 2024-03-26 08:45:27 +00:00
os
ot oterm: 0.2.4 -> 0.2.5 2024-04-02 19:41:32 +00:00
ou
ov overskride: 0.5.6 -> 0.5.7 2024-03-24 13:27:21 +00:00
ow owmods-cli: 0.13.0 -> 0.13.1 2024-03-24 11:01:08 +00:00
pa payme: fix version number string (#297480) 2024-03-22 13:55:44 +01:00
pd Merge pull request #299514 from Aleksanaa/pdf4qt 2024-03-29 21:56:05 +01:00
pe pest: 2.34.4 -> 2.34.5 2024-03-24 10:36:03 +01:00
pf/pfft
pg pgmoneta: 0.9.0 -> 0.10.0 2024-03-29 01:46:06 +00:00
ph phpactor: change maintainer & move to by-name 2024-04-03 20:01:34 +02:00
pi pingme: init at 0.2.6 2024-04-02 12:33:50 +11:00
pk/pkcrack
pl Merge pull request #298556 from kachick/init-plemoljp-font 2024-04-04 08:37:15 +11:00
pm
pn
po pot: 2.7.4 -> 2.7.9 2024-03-29 16:59:48 +08:00
pp/ppsspp
pq
pr prowler: relax azure-storage-blob 2024-04-03 20:22:01 +02:00
pt
pu pupdate: 3.9.0 -> 3.9.1 2024-03-30 03:03:32 +00:00
pv/pvsneslib pvsneslib: init at 4.2.0 2024-04-01 17:22:36 +02:00
pw
px/pxder
py pyprland: 2.0.9 -> 2.1.1 2024-04-02 11:34:30 +01:00
pz/pzip
qa/qadwaitadecorations
qc/qcm
qd/qdirstat
qg/qgrep
qr
qs
qt/qtractor
qu quarkus: 3.8.3 -> 3.9.1 2024-04-01 03:39:08 +00:00
ra railway-travel: remove package due to duplication 2024-04-01 17:46:35 +02:00
rc rcu: init at 2024.001n 2024-03-28 09:46:37 +01:00
rd/rdwatool
re Merge pull request #298740 from felixsinger/pkgs/redmine/rework 2024-04-01 18:17:17 +00:00
ri ricochet-refresh: 3.0.18 -> 3.0.22 (#298866) 2024-03-25 21:39:54 +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 rmenu: init at 1.2.0 2024-04-03 18:09:53 +02:00
ro Merge pull request #295646 from jnsgruk/rockcraft 2024-03-31 20:55:07 +02:00
rp/rpcs3
rq/rqbit rqbit: 5.5.3 -> 5.5.4 2024-03-29 04:20:00 +00:00
rs
rt rtg-tools: init at 3.12.1 2024-04-02 23:20:30 +02:00
ru
rw/rwpspread rwpspread: 0.2.4 -> 0.2.5 2024-04-03 11:15:01 +00:00
ry/ryujinx ryujinx: 1.1.1242 -> 1.1.1248 2024-03-29 17:07:50 +00:00
s3
sa sarasa-gothic: 1.0.8 -> 1.0.9 2024-03-31 00:34:45 +01:00
sc scion-bootstrapper: init at 0.0.7 2024-03-30 17:34:48 +01:00
sd
se Merge pull request #299618 from TomaSajt/dub-support 2024-04-04 11:52:57 +02:00
sg/sgfutils
sh shopware-cli: 0.4.30 -> 0.4.33 2024-04-03 06:02:20 +00:00
si Merge pull request #298616 from sikmir/simplotask 2024-04-04 00:22:05 +04:00
sl
sm smuxi: init at unstable-2023-07-01 2024-03-27 08:45:34 +08:00
sn sn-pro: init at 1.1.0 2024-03-31 15:20:54 -07:00
so
sp spicetify-cli: 2.34.1 -> 2.36.0 2024-03-27 07:04:33 +00:00
sq Merge pull request #293588 from ambroisie/bt-migrate 2024-03-28 00:48:00 +01:00
sr
ss Merge pull request #249404 from stigtsp/package/ssh-tpm-agent-init 2024-03-27 04:21:26 +01:00
st Merge pull request #283305 from TomaSajt/stirling-pdf 2024-04-03 07:39:17 +02:00
su Merge pull request #291214 from RatCornu/suwayomi-server 2024-03-23 17:56:19 +01:00
sv
sw swaymux: 1.0 -> 1.1 2024-04-02 21:30:18 +02:00
sx
sy symfony-cli: 5.8.13 -> 5.8.14 2024-03-24 05:34:44 +00:00
t-/t-rex
ta Merge pull request #301038 from r-ryantm/auto-update/tailscale-nginx-auth 2024-04-03 10:04:59 -04:00
tc/tcsh
td/tdl
te Merge pull request #296454 from Kropatz/update-tetrio-desktop 2024-03-26 21:40:39 +01:00
tg/tgpt tgpt: 2.7.2 -> 2.7.3 2024-03-30 12:38:17 +00:00
th
ti Merge pull request #291129 from blinry/tic-80 2024-04-01 13:54:39 +02:00
tk/tkdiff
tl tlrc: 1.9.0 -> 1.9.1 2024-03-28 21:47:17 +01:00
tm/tmuxifier
to toxic: fix license 2024-04-01 00:10:33 +02:00
tp
tr treedome: 0.4.3 -> 0.4.5 2024-03-29 11:41:10 +07:00
tt/ttop
tu tunnelgraf: init at 0.6.1 2024-03-25 10:15:36 +01:00
tx/txr
ty typstyle: 0.11.5 -> 0.11.8 2024-04-01 09:59:54 +02:00
uc
ud
ue uefisettings: unstable-2024-02-20 -> 0-unstable-2024-03-26 2024-03-28 10:24:44 +01:00
ug/ugrep-indexer
ui
um/umpire
un Merge pull request #297525 from r-ryantm/auto-update/unciv 2024-03-30 18:23:21 +01:00
up treewide: remove explicit -trimpath from Go pkgs 2024-03-28 07:57:19 +01:00
us/usql usql: 0.17.5 -> 0.18.1 2024-03-29 20:59:47 +01:00
ut ut1999: add aarch64_linux support 2024-03-31 19:20:10 +03:00
uu/uuu
uv/uv uv: 0.1.22 -> 0.1.24 2024-03-25 05:36:47 +00:00
uw/uwhoisd
ux/uxn uxn: unstable-2024-03-18 -> unstable-2024-03-30 2024-04-01 20:33:53 +00:00
va
vc vcpkg: 2024.03.19 -> 2024.03.25 2024-03-31 22:30:34 +00:00
ve vencord: 1.7.3 -> 1.7.4 2024-03-30 14:37:43 +01:00
vg/vgm2x
vi Merge pull request #297266 from ByteSudoer/init-vidmerger 2024-03-25 20:58:14 +01:00
vl vlc-bittorrent: init at 2.15.0 2024-03-25 18:30:03 +01:00
vu Merge master into staging-next 2024-03-31 12:01:07 +00:00
wa wayland-pipewire-idle-inhibit: 0.5.0 -> 0.5.1 2024-04-02 07:04:07 +00:00
wb/wb32-dfu-updater
we Merge pull request #293730 from pokon548/add-wechat-uos 2024-03-28 11:00:10 +01:00
wh whatfiles: init at 1.0 2024-03-31 20:47:52 +03:00
wi Merge pull request #300909 from fabaff/witnessme 2024-04-03 23:25:03 +02:00
wl wlx-overlay-s: init at 0.3.2 2024-03-28 23:58:53 +01:00
wo Merge pull request #300264 from fabaff/world-serpant-search 2024-03-31 11:28:37 +02:00
wp/wp-cli
ws Merge pull request #300320 from fabaff/wsrepl 2024-03-31 11:28:30 +02:00
wt/wtfis
wy/wyoming-satellite wyoming-satellite: init at 1.2.0 2024-03-29 03:04:43 +01:00
x1/x16 Merge pull request #300371 from r-ryantm/auto-update/x16-emulator 2024-03-31 03:04:43 +00:00
x5/x509-limbo
xa/xarcan
xc
xd
xe xemu: refactor 2024-03-24 21:42:35 -03:00
xf/xfs-undelete
xi xiu: 0.12.5 -> 0.12.6 2024-04-04 01:59:13 +00:00
xm
xo xorriso: alias to libisoburn 2024-03-24 23:26:26 -03:00
xp/xplr
xr/xr-hardware xr-hardware: add update script 2024-03-26 21:32:44 +01:00
xs
xw/xwayland-run xwayland-run: 0.0.2 -> 0.0.3 2024-03-25 20:51:45 -03:00
ya yamlscript: 0.1.45 -> 0.1.46 2024-03-23 03:56:43 +00:00
yc/ycmd ycmd: Migrate to by-name 2024-03-27 22:54:49 +01:00
ye yesplaymusic: move to by-name 2024-04-01 01:15:07 +08:00
yg/yggdrasil
yj/yj
yo youtrack: 2024.1.25893 -> 2024.1.26888 2024-03-23 11:35:15 +00:00
ys/ysfx
yt
yu yutto: 2.0.0b35 -> 2.0.0b36-unstable-2024-03-04 2024-03-23 01:30:04 +08:00
za Merge pull request #294036 from r-ryantm/auto-update/zabbix-agent2-plugin-postgresql 2024-03-31 14:53:06 +00:00
zb/zbus-xmlgen zbus-xmlgen: 4.0.1 -> 4.1.0 2024-04-01 09:36:23 +02:00
zc/zcfan
ze/zesarux
zi zircolite: refactor 2024-03-29 10:17:14 +01:00
zo/zola
zp
zs
zu/zug
zw/zwave-js-server
zx
README.md treewide: Fix all Nix ASTs in all markdown files 2024-03-28 09:28:12 +01: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. 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;
}