1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00
nixpkgs/pkgs/by-name
Emily 2eb6b359a5
fizz: add emily to maintainers
(cherry picked from commit 5115b6186a)
(cherry picked from commit 4211b842ce)
2024-11-30 15:11:17 +01:00
..
_0
_1
_2
_3
_4
_5/_5etools
_6
_7
_9
a2
a4/a4
a5/a52dec
aa
ab
ac act: add passthru.tests.version (#356374) 2024-11-29 17:10:16 +08:00
ad
ae
af
ag
ah
ai aider-chat: 0.62.0 -> 0.65.0 2024-11-27 21:47:58 -05:00
aj/aj-snapshot
ak/akira-unstable
al alpaca: 2.8.0 -> 2.9.0 (#360033) 2024-11-30 10:43:37 +08:00
am amazon-cloudwatch-agent: 1.300049.1 -> 1.300050.0 (#357907) 2024-11-29 17:32:52 +01:00
an ant: modernize, update primary name (#360077) 2024-11-29 09:57:18 -08:00
ao/aocl-utils
ap apacheAnt: make ant the primary name 2024-11-29 01:19:02 +00:00
aq
ar arduino-cli: fix fhsenv version (#359959) 2024-11-29 22:14:17 +01:00
as
at atlas: 0.28.1 -> 0.29.0 (#359587) 2024-11-28 08:58:56 +00:00
au autoconf-archive: fix quoting of m4_fatal 2024-11-30 15:11:10 +01:00
av
aw
ax
ay
az
b3/b3sum
b4
b6/b612
ba treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
bb
bc
bd
be treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
bf bfg-repo-cleaner: format with nixfmt-rfc-style and add passthru.tests.version (#357491) 2024-11-29 17:13:52 +08:00
bg
bi treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
bj/bjumblr
bk
bl treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
bm
bn/bngblaster
bo
bp
bq
br treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
bs
bt
bu buildkite-agent: 3.87.0 -> 3.87.1 (#359617) 2024-11-28 14:20:26 +01:00
bv
bw
by
bz/bzrtp
c-
c2 c2fmzq: 0.4.22 -> 0.4.25 2024-11-29 09:25:48 +00:00
c3
c6/c64-debugger
ca treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
cb
cc
cd
ce
cf
cg
ch treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
ci treewide: remove AndersonTorres from maintainers (#360012) 2024-11-29 20:53:47 +01:00
cj
ck
cl
cm
cn
co treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
cp
cq/cq
cr cruft: init at 2.15.0 (#299346) 2024-11-30 12:55:10 +08:00
cs
ct
cu curl: backport netrc regression fix 2024-11-30 15:11:10 +01:00
cv
cw
cx
cy
cz
d-
d2
da
db
dc
dd
de treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
df
dg
dh
di diffstat: add a trivial updater 2024-11-28 22:55:04 +01:00
dj
dk
dl
dm
dn
do docker-credential-gcr: 2.1.25 -> 2.1.26 2024-11-28 00:21:00 +00:00
dp
dq
dr
ds
dt
du
dv
dw
dx
dy
dz/dzen2
e1
e2
ea
eb
ec
ed
ee/eepers
ef
eg
ei
ej
ek
el treewide: remove AndersonTorres from maintainers 2024-11-28 21:12:42 -03:00
em maintainers: remove stnley 2024-11-29 20:20:31 -05:00
en
eo
ep
eq
er erigon, nodeinfo: fix tags for buildGoModule (#360030) 2024-11-29 19:43:35 -05:00
es
et
eu
ev
ew
ex exploitdb: 2024-11-16 -> 2024-11-26 2024-11-28 22:32:46 +01:00
ey
ez eza: 0.20.9 -> 0.20.10 2024-11-28 08:41:59 +01:00
f1
f2
f3/f3
f5/f5_6
fa factoriolab: 3.8.1 -> 3.8.4 (#359720) 2024-11-29 17:27:03 +01:00
fb
fc
fd
fe
ff ffms: fix vapoursynth plugin on darwin (#359262) 2024-11-28 13:52:21 +01:00
fg
fh fh: 0.1.18 -> 0.1.19 2024-11-28 07:30:52 +00:00
fi fizz: add emily to maintainers 2024-11-30 15:11:17 +01:00
fj/fjo
fl pkgs.dockertools.buildLayeredImage: customisable layering strategy (#122608) 2024-11-29 22:39:21 -05:00
fm treewide: remove AndersonTorres from maintainers 2024-11-28 21:12:42 -03:00
fn
fo folly: add techknowlogick to maintainers 2024-11-30 15:11:14 +01:00
fp
fq/fq
fr
fs
ft
fu
fv
fw
fx
fy
fz
g-/g-wrap
g1/g15daemon
g2/g203-led
g3/g3kb-switch
g8/g810-led
g9/g933-utils
ga gancio: remove mkYarnPackage usage (#341917) 2024-11-28 10:15:03 +01:00
gb
gc
gd
ge
gf gf: unstable-2023-08-09 -> 0-unstable-2024-08-21; include extensions and add plugin support (#357435) 2024-11-29 06:16:26 +11:00
gg
gh ghq: add passthru.tests.version and updateScript (#356244) 2024-11-29 17:09:55 +08:00
gi gitlab: 17.3.7 -> 17.5.2 (#360160) 2024-11-30 09:51:21 +01:00
gj
gk/gk-cli gkraken,nixos/gkraken: Drop (#358200) 2024-11-30 10:54:30 +08:00
gl glamoroustoolkit: 1.1.7 -> 1.1.8 2024-11-29 08:09:12 +00:00
gm
gn gnmic: fix version reporting 2024-11-27 20:29:40 +01:00
go gose: init at 0.8.0 (#354159) 2024-11-30 10:51:14 +08:00
gp
gq
gr treewide: remove AndersonTorres from maintainers (#360012) 2024-11-29 20:53:47 +01:00
gs gswatcher: init at 1.7.1 (#359789) 2024-11-29 22:34:08 +08:00
gt
gu
gv
gw
gx
gy
gz
h2
h5/h5utils
h8/h8mail
ha halloy: fix add halloy url scheme handler (#351700) 2024-11-30 09:00:44 +01:00
hb
hc
hd
he
hf
hh
hi
hj/hjson-go
hl/hledger-check-fancyassertions
hm
hn
ho treewide: use dpkg setup hook (#359417) 2024-11-27 16:11:23 -08:00
hp
hq/hqplayerd
hr
hs
ht
hu
hv/hvm
hw
hx/hxtools
hy hyprgui: 0.1.8 -> 0.1.9 (#357029) 2024-11-30 00:25:01 +01:00
i-/i-dot-ming
i2
i3
i8/i810switch
ia
ib
ic
id
if
ig
ih/ihp-new
ii
ij
ik
il
im
in
io
ip ipfs-cluster: 1.1.1 -> 1.1.2 2024-11-29 02:41:50 +00:00
iq
ir
is
it treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
iu/iucode-tool
iv
iw
ix/ix
iz/izrss
j/j
j4/j4-dmenu-desktop
ja treewide: pin Gradle 8 where deprecation warning present in build log (#359177) 2024-11-27 13:45:10 -08:00
jb
jc
jd
je
jf
jg/jgmenu
jh
ji treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
jj/jj
jm
jn
jo jogger: 1.2.4-unstable-2024-04-05 -> 1.2.5 (#360093) 2024-11-30 14:50:02 +08:00
jp
jq
jr
js
jt
ju jumppad: 0.15.0 -> 0.16.0 2024-11-29 09:46:58 +00:00
jw jwx: 2.1.1 -> 2.1.3 2024-11-30 10:13:14 +00:00
jx jx: 3.10.156 -> 3.11.1 2024-11-27 21:28:38 +00:00
jy/jython
k0/k0sctl
k2
k3
k4/k40-whisperer
k6/k6
k8
k9/k9s
ka treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
kb
kc treewide: remove AndersonTorres from maintainers 2024-11-28 21:12:42 -03:00
kd
ke
kf/kfilt
kg/kgeotag
kh
ki treewide: remove AndersonTorres from maintainers 2024-11-28 21:12:42 -03:00
kl
km
kn
ko treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
kp
kr krop: pin pypdf2 version (#357570) 2024-11-27 22:17:14 -05:00
ks
kt
ku treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
kv
kw
kx
ky
l2/l2md
la
lb
lc
ld ldeep: 1.0.75 -> 1.0.76 2024-11-28 22:47:13 +01:00
le treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
lf/lftp
lg
lh
li librist: fix build for musl 2024-11-30 15:11:08 +01:00
lk
ll lla: init at 0.2.9 (#359293) 2024-11-29 10:53:36 +08:00
lm
ln
lo treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
lp
lr
ls
lt
lu treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
lv
lw
lx
ly
lz
m-/m-cli
m1
m2
m3/m33-linux
m4
ma treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
mb
mc
md
me meson.setupHook: Add timeout-multiplier 2024-11-30 15:11:11 +01:00
mf
mg
mh/mhddfs
mi mistral-rs: switch to fetchCargoVendor; use config.cudaCapability as default for cudaCapability (#359997) 2024-11-30 06:38:23 +01:00
mj
mk
ml
mm
mn
mo mopac: 23.0.0 -> 23.0.2 (#358949) 2024-11-28 16:10:51 +01:00
mp
mq mqtt-randompub: init at 0.2.2 (#360094) 2024-11-30 10:05:07 +01:00
mr
ms
mt
mu mutt: remove ? null from packages (#359273) 2024-11-29 22:57:34 +01:00
mv
mw/mw
mx
my mycelium: 0.5.6 -> 0.5.7 2024-11-28 08:44:41 +00:00
n2
n3/n3
n8/n8n
n9 n98-magerun2: 7.4.0 -> 7.5.0 2024-11-28 21:07:25 +00:00
na
nb
nc
nd
ne treewide: pin Gradle 8 where deprecation warning present in build log (#359177) 2024-11-27 13:45:10 -08:00
nf
ng
nh
ni nix-plugin-pijul: 0.1.4 -> 0.1.5 (#360005) 2024-11-30 10:23:02 +01:00
nj/njam
nk
nl
nm
nn
no erigon, nodeinfo: fix tags for buildGoModule (#360030) 2024-11-29 19:43:35 -05:00
np
nq
nr
ns
nt ntirpc: 6.0.1 -> 6.3 2024-11-30 11:33:59 +01:00
nu
nv treewide: remove AndersonTorres from maintainers (#360012) 2024-11-29 20:53:47 +01:00
nw
nx
ny
nz
oa
ob
oc
od
oe
of
og
oh
oi
ok
ol
om
on onionshare: add update script 2024-11-28 23:50:46 +01:00
oo
op open-webui: add env.NODE_OPTIONS (#359891) 2024-11-28 18:21:45 +01:00
oq
or
os
ot
ou
ov
ow
ox oxipng: 9.1.2 -> 9.1.3 2024-11-30 04:56:46 +00:00
p0/p0f
p1/p11-kit
p2/p2pool
p3/p3x-onenote
p4/p4d
p9/p910nd
pa pappl: 1.4.7 -> 1.4.8 2024-11-30 05:09:46 +00:00
pb
pc
pd
pe
pf
pg
ph phraze: 0.3.15 -> 0.3.17 (#359745) 2024-11-29 17:20:41 +01:00
pi
pk
pl
pm
pn
po treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
pp
pq
pr treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
ps
pt
pu
pv
pw
px
py
pz/pzip
q-/q-text-as-data
q2/q2pro
qa qadwaitadecorations-qt6: 0.1.5 -> 0.1.6 2024-11-29 06:52:03 +00:00
qb
qc
qd
qe
qg
qh/qhull
qi/qidi-slicer-bin
qm
qn/qnial
qo
qp
qq
qr
qs
qt
qu
qw/qwerty-fr
r0/r0vm
r1
r2 treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
r5/r53-ddns
ra rabbitmq-server: 4.0.2 → 4.0.4 (#358653) 2024-11-30 12:15:16 +01:00
rb
rc rclip: 1.10.3 -> 1.11.0 2024-11-28 15:38:59 +01:00
rd
re redlib: 0.35.1-unstable-2024-11-01 -> 0.35.1-unstable-2024-11-27 2024-11-30 09:47:04 +01:00
rf
rg
rh
ri treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
rk
rl
rm
rn
ro
rp
rq
rr
rs
rt
ru
rv/rvvm
rw
rx
ry
rz/rzip
s-
s0/s0ix-selftest-tool
s2
s3
s4/s4cmd
s5
s7/s7
s9/s9fes
sa
sb
sc treewide: remove AndersonTorres from maintainers 2024-11-28 21:12:42 -03:00
sd treewide: remove AndersonTorres from maintainers 2024-11-28 21:12:42 -03:00
se treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
sf
sg
sh shadershark: simplify update script (#342342) 2024-11-29 15:20:00 +00:00
si sidequest: fix fhsenv version (#359965) 2024-11-29 19:05:09 +01:00
sj/sjasmplus
sk
sl
sm
sn
so treewide: remove AndersonTorres from maintainers 2024-11-28 21:12:42 -03:00
sp treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
sq sqlitestudio: 3.4.5 -> 3.4.6 2024-11-28 11:21:44 +08:00
sr
ss
st step-ca: 0.27.5 -> 0.28.0 (#357083) 2024-11-28 19:17:47 +00:00
su
sv svt-av1-psy: 2.2.1-B -> 2.3.0 2024-11-29 10:59:54 +00:00
sw
sx
sy
sz
t-/t-rex
t1
t4/t4kcommon
ta taler-exchange,taler-merchant: fix description (#359858) 2024-11-28 16:20:19 +01:00
tb
tc
td
te treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
tf
tg
th
ti treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
tk
tl
tm
tn
to tor-browser: 14.0.2 -> 14.0.3, mullvad-browser: 14.0 -> 14.0.3 (#359368) 2024-11-27 19:32:21 +01:00
tp
tq/tqsl
tr treefmt2: 2.1.0 -> 2.1.1 (#360123) 2024-11-29 15:52:24 +01:00
ts
tt
tu
tv
tw
tx
ty typstyle: 0.12.4 -> 0.12.5 2024-11-30 01:06:42 +01:00
tz
u-
u0/u001-font
u2/u2ps
u3/u3-tool
u9/u9fs
ua
ub
uc
ud
ue
uf
ug ugm: 1.5.0 -> 1.6.0 2024-11-27 19:33:31 +00:00
uh
ui
uk/ukmm
ul
um
un
up treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
uq
ur
us
ut
uu
uv
uw
ux
v2
v4/v4l2-relayd
va vapoursynth-znedi3: fix darwin build 2024-11-27 23:52:37 +01:00
vb
vc
vd
ve vermin: init a 1.6.0 (#356403) 2024-11-30 15:05:29 +08:00
vf/vfkit
vg
vh
vi
vk vkdt: 0.9.0 -> 0.9.1 2024-11-28 22:47:09 +00:00
vl
vm
vn
vo
vp
vr
vs
vt
vu vunnel: 0.28.0 -> 0.29.0 2024-11-28 23:11:22 +01:00
vv
vw
vx/vxl
vy
vz/vzic
w3/w3m
w_
wa treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
wb
wc
wd folly: propagate required dependencies 2024-11-30 15:11:14 +01:00
we webdav: 5.4.3 -> 5.4.4 2024-11-29 23:53:16 +01:00
wf
wg
wh
wi treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
wk/wkhtmltopdf
wl wl-clipboard-rs: 0.9.0 -> 0.9.1 (#359015) 2024-11-27 19:36:04 +00:00
wm
wo treewide: add --enable-wayland-ime flag to all Electron packages that uses NIXOS_OZONE_WL (#358620) 2024-11-29 18:48:23 +01:00
wp
wq
wr
ws
wt treewide: remove AndersonTorres from maintainers 2024-11-28 21:12:42 -03:00
wu
wv
ww/wwcd
wx
wy
x-/x-create-mouse-void
x1
x2
x3/x3270
x4
x8/x86info
xa
xb
xc
xd Cinnamon updates 2024-11-26 (#359288) 2024-11-28 20:53:57 +08:00
xe Cinnamon updates 2024-11-26 (#359288) 2024-11-28 20:53:57 +08:00
xf
xg
xh
xi
xj
xk
xl
xm
xn
xo
xp treewide: remove AndersonTorres from maintainers 2024-11-28 21:12:42 -03:00
xq
xr
xs
xt
xu
xv
xw
xx
xy/xylib
xz
ya
yc/ycmd
yd
ye
yg
yj/yj
yl/yle-dl
ym
yo
yp/ypbind-mt
yq/yq-go
ys/ysfx
yt ytdownloader: 3.18.3 -> 3.18.4 (#360118) 2024-11-30 08:58:54 +00:00
yu
yx/yx
yy/yyjson
z-/z-lua
z8/z88dk
za
zb
zc
zd
ze Revert "zen-browser: init at 1.0.1-a.22" 2024-11-30 11:26:04 +08:00
zf
zg
zi
zk
zl
zm
zn
zo
zp
zr/zrepl
zs
zt
zu
zv/zvbi
zw/zwave-js-server
zx
zy/zydis
zz
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;
}