2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-02-20 02:55:39 +00:00
nixpkgs/pkgs/by-name
2024-11-25 09:13:37 -08:00
..
_0
_1
_2
_3
_4
_5/_5etools
_6
_7/_7kaa
_9
a2
a4/a4
a5/a52dec
aa aactivator: init at 2.0.0 () 2024-11-24 20:40:16 +08:00
ab
ac
ad
ae aerospike: 7.2.0.1 -> 7.2.0.4 2024-11-25 08:13:20 +00:00
af
ag
ah
ai
aj/aj-snapshot
ak/akira-unstable
al
am ams-lv2: Mark broken () 2024-11-24 20:09:45 +08:00
an
ao/aocl-utils
ap
aq
ar
as astyle: 3.6.3 -> 3.6.4 () 2024-11-24 20:14:50 +08:00
at
au
av
aw aw-watcher-window-wayland: 6108ad3df8e157965a43566fa35cdaf144b1c51b -> unstable-2024-10-08; switch to fetchCargoVendor () 2024-11-24 16:42:24 +05:30
ax
ay
az
b3/b3sum
b4
b6/b612
ba bash-env-json: init at 0.9.1 () 2024-11-24 21:58:41 +08:00
bb
bc
bd
be
bf
bg
bi bicep: 0.30.23 -> 0.31.92 () 2024-11-25 09:06:58 -05:00
bj/bjumblr
bk
bl
bm
bn/bngblaster
bo
bp
bq
br
bs
bt btrfs-list: init at 2.3 () 2024-11-24 14:47:58 +01:00
bu
bv
bw
by
bz/bzrtp
c2
c3
c6/c64-debugger
c-
ca
cb
cc
cd
ce
cf
cg
ch chirpstack-concentratord: init at 4.4.2 () 2024-11-24 20:35:35 +08:00
ci circom: 2.2.0 -> 2.2.1 () 2024-11-25 09:13:12 -05:00
cj
ck
cl
cm
cn
co
cp
cq/cq
cr
cs
ct
cu
cv
cw
cx
cy
cz
d2
d-
da
db
dc
dd
de deno: 2.0.6 -> 2.1.1 () 2024-11-25 03:25:32 +00:00
df
dg
dh
di
dj
dk
dl
dm
dn
do dovecot_fts_xapian: 1.7.14 -> 1.8 () 2024-11-24 15:31:38 +01:00
dp
dq
dr
ds
dt
du
dv
dw
dx
dy dynamodb-local: 2.5.2 -> 2.5.3 2024-11-24 21:30:40 +00:00
dz/dzen2
e1
e2
ea
eb
ec
ed
ee/eepers
ef
eg
ei eigenmath: 3.27-unstable-2024-10-18 -> 3.33-unstable-2024-11-22 2024-11-25 09:44:29 +00:00
ej
ek
el
em
en
eo
ep epson-escpr2: 1.2.20 -> 1.2.21 2024-11-24 17:21:48 +01:00
eq
er
es
et
eu
ev
ew
ex
ey
ez
f1
f2
f3/f3
f5/f5_6
fa factorio: fix updateScript definition () 2024-11-25 14:53:04 +00:00
fb
fc
fd
fe
ff
fg
fh
fi
fj/fjo
fl flyctl: 0.3.37 -> 0.3.40 () 2024-11-25 08:18:02 -05:00
fm
fn
fo
fp
fq/fq
fr
fs
ft
fu
fv
fw fwupd: fix build when cross compiling 2024-11-25 09:13:37 -08:00
fx
fy
fz
g1/g15daemon
g2/g203-led
g3/g3kb-switch
g8/g810-led
g9/g933-utils
g-/g-wrap
ga
gb
gc
gd
ge
gf
gg
gh ghstack: 0.9.3 -> 0.9.4 () 2024-11-24 23:09:15 +00:00
gi gitkraken: 10.4.1 -> 10.5.0 2024-11-25 11:04:10 +01:00
gj
gk
gl glaze: 4.0.0 -> 4.0.1 () 2024-11-25 09:14:17 -05:00
gm
gn
go govc: 0.44.0 -> 0.46.2 () 2024-11-25 08:55:20 -05:00
gp
gq
gr
gs
gt
gu
gv
gw
gx
gy
gz
h2
h5/h5utils
h8/h8mail
ha
hb
hc
hd
he
hf
hh
hi hishtory: 0.304 -> 0.318 2024-11-24 15:02:52 +00:00
hj/hjson-go
hl/hledger-check-fancyassertions
hm
hn
ho
hp
hq/hqplayerd
hr
hs
ht
hu
hv/hvm
hw
hx/hxtools
hy
i2
i3 i3bar-river: 1.0.1 -> 1.1.0 2024-11-25 11:03:41 +00:00
i8/i810switch
i-/i-dot-ming
ia
ib
ic
id
if
ig
ih/ihp-new
ii
ij
ik
il
im impression: 3.2.0 -> 3.3.0 () 2024-11-24 19:10:01 -08:00
in
io
ip
iq
ir
is
it
iu/iucode-tool
iv
iw
ix/ix
iz/izrss
j/j
j4/j4-dmenu-desktop
ja
jb
jc
jd
je
jf
jg/jgmenu
jh
ji
jj/jj
jm
jn
jo
jp
jq
jr
js
jt
ju
jw
jx
jy/jython
k0/k0sctl
k2
k3
k4/k40-whisperer
k6/k6
k8
k9/k9s
ka kazumi: 1.4.3 -> 1.4.4 () 2024-11-24 22:05:37 +00:00
kb
kc
kd
ke
kf/kfilt
kg/kgeotag
kh
ki
kl
km
kn
ko kodi-retroarch-advanced-launchers: move to pkgs/by-name, format with nixfmt-rfc-style 2024-11-24 21:58:01 +00:00
kp
kr
ks
kt
ku kubectl-gadget: 0.33.0 -> 0.34.0 () 2024-11-25 03:45:54 +00:00
kv
kw
kx
ky
l2/l2md
la lan-mouse: 0.9.1 → 0.10.0 () 2024-11-25 08:19:11 +01:00
lb
lc
ld
le
lf/lftp
lg
lh
li retroarch: refactor () 2024-11-25 16:58:02 +00:00
lk
ll
lm
ln
lo lock: 1.1.3 -> 1.2.0 2024-11-24 13:35:40 +00:00
lp
lr
ls
lt
lu luminance: init at 1.1.0 () 2024-11-24 20:04:56 +08:00
lv
lw
lx
ly
lz
m1
m2
m3/m33-linux
m4
m-/m-cli
ma
mb
mc
md
me melody: 0.19.0 -> 0.20.0 2024-11-25 02:47:52 +00:00
mf
mg
mh/mhddfs
mi mission-center: switch to using fetchCargoVendor 2024-11-24 20:13:44 +01:00
mj
mk
ml
mm
mn
mo mollysocket: 1.5.2 -> 1.5.3 () 2024-11-24 19:11:15 -08:00
mp mpris-timer: init at 1.1.1 () 2024-11-24 22:46:53 +08:00
mq
mr
ms
mt
mu multiviewer-for-f1: 1.35.2 -> 1.36.1 () 2024-11-24 13:42:09 +01:00
mv
mw/mw
mx
my
n2
n3/n3
n8/n8n
n9
na
nb
nc ncmpc: fails on darwin 2024-11-25 10:52:35 +01:00
nd
ne
nf
ng
nh
ni nixVersions.{nix_2_20,nix_2_21,nix_2_22,nix_2_23}: drop 2024-11-25 16:12:18 +01:00
nj/njam
nk
nl
nm
nn
no notmuch-mailmover: 0.4.0 -> 0.5.0 2024-11-24 13:39:22 +00:00
np
nq
nr
ns
nt
nu
nv
nw
nx
ny
nz
oa
ob
oc
od
oe
of
og
oh
oi
ok
ol
om
on onefetch: 2.21.0 -> 2.22.0, migrate to by-name () 2024-11-24 17:08:52 +01:00
oo
op openscad-unstable: 2024-11-10 -> 2024-11-18 () 2024-11-24 16:56:33 +00:00
oq
or
os
ot
ou
ov
ow
ox
p0/p0f
p1/p11-kit
p2/p2pool
p3/p3x-onenote
p4/p4d
p9/p910nd
pa
pb
pc
pd
pe
pf
pg
ph
pi picom-pijulius: 8.2-unstable-2024-11-12 -> 8.2-unstable-2024-11-15 2024-11-25 06:12:32 +00:00
pk
pl
pm
pn
po
pp
pq
pr protoc-gen-go: 1.35.1 -> 1.35.2 2024-11-24 12:17:13 +00:00
ps
pt
pu pulsar: 1.122.0 -> 1.123.0 () 2024-11-25 13:13:38 +01:00
pv
pw
px
py
pz/pzip
q2/q2pro
q-/q-text-as-data
qa
qb
qc
qd
qe
qg
qh/qhull
qi/qidi-slicer-bin
qm
qn/qnial
qo
qp
qq
qr
qs
qt
qu quake-injector: init at 06 () 2024-11-24 22:01:23 +08:00
qw/qwerty-fr
r0/r0vm
r1
r2
r5/r53-ddns
ra radicle-{explorer,httpd}: 0.17.0 -> 0.17.1 () 2024-11-25 17:48:33 +01:00
rb
rc
rd
re retroarch: refactor () 2024-11-25 16:58:02 +00:00
rf
rg
rh
ri rigel-engine: init at 0-unstable-2024-05-26 2024-11-24 10:16:56 -06:00
rk
rl
rm
rn
ro roddhjav-apparmor-rules: 0-unstable-2024-10-06 -> 0-unstable-2024-11-24 2024-11-25 11:11:19 +00:00
rp
rq
rr
rs
rt
ru
rv/rvvm
rw
rx
ry
rz/rzip
s0/s0ix-selftest-tool
s2
s3
s4/s4cmd
s5
s7/s7
s9/s9fes
s-
sa
sb
sc
sd
se sea-orm-cli: 1.0.1 -> 1.1.1 () 2024-11-24 23:47:01 +00:00
sf
sg
sh
si
sj/sjasmplus
sk
sl
sm
sn
so
sp
sq
sr
ss
st stirling-pdf: 0.30.1 -> 0.33.1 () 2024-11-24 23:45:10 -08:00
su
sv svelte-language-server: 0.17.5 -> 0.17.7 2024-11-24 21:02:00 +00:00
sw
sx
sy sysdig-cli-scanner: do not use --dbpath arg when --iac is set () 2024-11-25 15:14:35 +01:00
sz
t1
t4/t4kcommon
t-/t-rex
ta
tb
tc
td
te termbg: init at 0.6.0 () 2024-11-24 21:59:29 +08:00
tf
tg
th
ti timewall: init at 1.2.0 () 2024-11-24 21:20:03 +08:00
tk
tl
tm
tn
to torq: drop 2024-11-24 13:35:05 +01:00
tp
tq/tqsl
tr trayscale: 0.13.5 -> 0.14.0 2024-11-24 15:45:20 +00:00
ts
tt
tu
tv
tw
tx
ty typstyle: 0.12.1 -> 0.12.2 () 2024-11-24 14:00:00 +01:00
tz
u0/u001-font
u2/u2ps
u3/u3-tool
u9/u9fs
u-
ua
ub
uc
ud
ue
uf
ug
uh
ui
uk/ukmm
ul
um
un
up
uq
ur
us
ut
uu
uv
uw
ux
v2
v4/v4l2-relayd
va vault-tasks: 0.4.0 -> 0.5.0 2024-11-24 16:22:07 +00:00
vb
vc
vd
ve versitygw: init at 1.0.8 () 2024-11-24 20:32:18 +08:00
vf/vfkit
vg
vh
vi vidcutter: init at 6.0.5.3 () 2024-11-24 21:15:43 +08:00
vk
vl
vm
vn
vo
vp
vr
vs
vt
vu
vv
vw
vx/vxl
vy
vz/vzic
w3/w3m
w_
wa warp: 0.7.0 -> 0.8.0 () 2024-11-24 16:35:27 -08:00
wb
wc
wd
we
wf
wg
wh
wi
wk/wkhtmltopdf
wl
wm
wo
wp
wq
wr
ws
wt
wu
wv
ww/wwcd
wx
wy
x1
x2
x3/x3270
x4
x8/x86info
x-/x-create-mouse-void
xa
xb
xc xcp: 0.21.3 -> 0.22.0 () 2024-11-25 03:31:44 +00:00
xd
xe xenon: 0.9.1 -> 0.9.3 2024-11-25 13:11:11 +00:00
xf
xg
xh
xi
xj
xk
xl
xm
xn
xo
xp
xq
xr
xs
xt
xu
xv
xw
xx
xy/xylib
xz
ya
yc/ycmd
yd
ye
yg yggdrasil: 0.5.9 -> 0.5.10 2024-11-24 13:20:52 +00:00
yj/yj
yl/yle-dl
ym
yo
yp/ypbind-mt
yq/yq-go
ys/ysfx
yt
yu
yx/yx
yy/yyjson
z8/z88dk
z-/z-lua
za
zb
zc
zd
ze
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;
}