nixpkgs/pkgs/by-name
Florian Klink bc83c7cf57
Merge pull request #330448 from flokli/wvdial
wvdial, wvstreams: init
2024-07-28 19:49:33 +03:00
..
_0/_0xpropo
_2/_2ship2harkinian
_4
_6/_64gram
_9/_9base
a4/a4
a5/a52dec
aa
ab
ac
ad
ae
af
ag agate: 3.3.7 → 3.3.8 2024-07-26 23:49:37 +04:00
ai
al
am
an ananicy-cpp: make bpf support optional 2024-07-28 01:16:48 +05:30
ao/aocl-utils
ap
aq/aquamarine
ar Merge pull request #324545 from paparodeo/treewide-strict-deps-fixes 2024-07-27 22:19:23 +03:00
as
at
au
av
aw
ax
ay
az
b3/b3sum
ba
bc
bd
be
bi
bk/bk
bl
bm/bmake
bn/bngblaster
bo
bp
bq/bqn
br
bs
bt
bu
by
c-
c2
ca Merge pull request #329911 from Aleksanaa/cameractrls 2024-07-28 17:09:44 +02:00
cb
cc
cd
ce Merge remote-tracking branch 'origin/master' into staging-next 2024-07-28 01:04:35 +03:00
cg
ch
ci
cj/cjs cjs: fix cross compilation, set strictDeps 2024-07-27 15:47:48 -04:00
cl
cm
cn/cntb
co
cp
cq/cq
cr
cs
ct/ctx
cu
cv/cvemap
cy
cz/czkawka
da
db
dc
dd
de
dg/dgoss
dh/dhcpig
di Merge branch 'master' into staging-next 2024-07-27 09:18:58 +02:00
dj/djent
dm
dn
do
dp
dr Merge pull request #219942 from vsharathchandra/druid_nix_module 2024-07-28 11:02:06 +02:00
ds
dt
du dust: 1.1.0 -> 1.1.1 2024-07-26 22:03:13 +00:00
dv/dvb-apps
dx
dy
e1/e1s
ea
eb
ec
ed
ee/eepers
ef/efibootmgr
ei
ej/ejsonkms
ek/eksctl
el
em
en
eo/eog
ep
er
es
et
eu
ev
ew/eww
ex
ey/eyewitness
ez/eza
f2/f2fs-tools
fa
fb/fbset
fc
fe
ff
fg/fgqcanvas
fi
fj/fjo
fl
fm
fn/fnott
fo
fr treewide: remove viric from meta.maintainers [no orphans] 2024-07-28 10:47:12 -03:00
fs
ft/fte
fu
fv
fw/fwupd fwupd: 1.9.21 -> 1.9.22 2024-07-27 12:28:34 +02:00
fx/fx
fy/fypp
fz fzf: 0.54.1 -> 0.54.2 2024-07-27 19:36:15 +02:00
g3/g3kb-switch
ga
gb
gc
gd
ge
gf
gg/gg
gh Merge pull request #328736 from Sigmanificient/ghi 2024-07-26 23:50:21 +02:00
gi git-igitt: init at 0.1.18 2024-07-28 15:34:28 +02:00
gl
gm
gn
go Merge master into staging-next 2024-07-28 06:01:00 +00:00
gp
gr
gt
gu
gv/gvisor
gx/gxml
h2/h2
h5/h5utils
h8/h8mail
ha Merge pull request #330117 from r-ryantm/auto-update/havn 2024-07-26 16:29:59 -04:00
hb/hb-honeypot
hd
he
hi
hj/hjson-go
hn/hn-text
ho
hp/hpp2plantuml
ht httm: 0.40.1 -> 0.40.4 2024-07-28 05:36:41 +00:00
hu
hv/hvm
hy
i2/i2p
i3
ia
ic
id
if/ifrextractor-rs
ig
ii
ij/ijhttp
im
in
io
ip
ir
is isisdl: init at 1.3.20 2024-07-27 14:03:11 +02:00
it
iv/iverilog
iw/iw
iz/izrss
ja
jd/jdt-language-server
je
ji
jj/jj
jn
jo
jq/jq-zsh-plugin
jr/jrl-cmakemodules
js
jt/jtdx
ju
jw/jwasm
ka
kc
kd
ke
kg/kgeotag
ki
kl
km
kn
ko
kp/kplex
kr
ks
kt
ku
kv/kvmarwaita
kx
ky
la
lb
lc
ld Merge branch 'master' into staging-next 2024-07-27 09:18:58 +02:00
le
lg/lgogdownloader
li Merge master into staging-next 2024-07-27 12:01:12 +00:00
lk/lk-jwt-service
ll llama-cpp: add shaderc dependency for Vulkan backend 2024-07-27 18:45:59 +05:30
lm
ln/lngen
lo
lp
ls
lt/ltris
lu
lv/lv_font_conv
lw/lwgrp
lx
lz
m1/m1ddc
m2
ma Merge #328673: staging-next 2024-07-20 2024-07-28 13:45:55 +02:00
mb
mc
md md-tui: 0.8.1 -> 0.8.3 2024-07-28 14:12:40 +02:00
me Merge remote-tracking branch 'origin/master' into staging-next 2024-07-28 01:04:35 +03:00
mf
mg
mi misconfig-mapper: 1.7.0 -> 1.8.0 2024-07-28 14:15:01 +00:00
mk
ml/mlx42
mo Merge remote-tracking branch 'origin/master' into staging-next 2024-07-28 01:04:35 +03:00
mp
mq
mr/mricron
ms
mu
my
n2/n2
n8/n8n
na
nb
nc
nd/ndstrim
ne Merge master into staging-next 2024-07-28 06:01:00 +00:00
nf
ng
nh
ni
nl
nm
nn
no
np
nr nrr: 0.9.3 -> 0.9.4 2024-07-27 07:40:17 +00:00
ns
nt
nu
nv
nw nwg-panel: 0.9.34 -> 0.9.36 2024-07-27 18:18:14 +00:00
nx/nxengine-evo
oa
ob
oc
od
oe/oelint-adv
of offat: 0.18.0 -> 0.19.1 2024-07-28 04:44:27 +00:00
oh
oi
ok/okolors
ol
om
on Merge pull request #324301 from leon-erd/drop_onlyoffice_7.2.0 2024-07-26 21:37:52 +02:00
oo
op Merge remote-tracking branch 'origin/master' into staging-next 2024-07-28 01:04:35 +03:00
or
os
ot
ou
ov
ow
pa
pc
pd
pe
pf/pfft
pg
ph phpunit: 11.2.7 -> 11.2.8 2024-07-26 19:50:11 +00:00
pi
pk
pl plasma-plugin-blurredwallpaper: init at 3.1.0 2024-07-27 15:49:52 +05:30
pm
pn
po
pp/ppsspp
pq
pr Merge remote-tracking branch 'origin/master' into staging-next 2024-07-28 01:04:35 +03:00
ps
pt
pu pupdate: 3.10.3 -> 3.11.0 2024-07-27 14:50:37 +00:00
pv
pw
px/pxder
py pyright: 1.1.370 -> 1.1.373 2024-07-26 21:37:24 +00:00
pz/pzip
qa/qadwaitadecorations
qb/qbittorrent-enhanced
qc/qcm
qd
qg/qgrep
qn/qnial
qo/qodem
qp/qpoases
qr
qs
qt/qtractor
qu
qw/qwerty-fr
r0/r0vm
r1/r10k
ra
rc
rd/rdwatool
re Merge remote-tracking branch 'origin/master' into staging-next 2024-07-28 01:04:35 +03:00
rh/rHttp
ri Merge remote-tracking branch 'origin/master' into staging-next 2024-07-28 01:04:35 +03:00
rk
rl/rl_json
rm rmpc: init at 0.2.1 2024-07-27 20:28:19 -04:00
rn rnote: 0.10.2 -> 0.11.0 2024-07-26 14:42:53 -07:00
ro
rp/rpcs3
rq
rs
rt
ru
rw/rwpspread
ry
s0/s0ix-selftest-tool
s3
sa sarasa-gothic: 1.0.15 -> 1.0.16 2024-07-27 14:30:28 +00:00
sb
sc
sd
se
sf/sfwbar
sg/sgfutils
sh
si
sk
sl
sm Merge pull request #330378 from Aleksanaa/smile 2024-07-28 10:58:00 +02:00
sn
so
sp
sq sqlite-vss: mark broken 2024-07-27 19:51:14 +00:00
sr treewide: remove viric from meta.maintainers [no orphans] 2024-07-28 10:47:12 -03:00
ss
st stats: 2.11.1 -> 2.11.4 2024-07-28 15:21:30 +03:00
su
sv
sw
sx
sy Merge pull request #330230 from r-ryantm/auto-update/symfony-cli 2024-07-26 22:58:19 +02:00
t-/t-rex
ta tabiew: 0.6.0 -> 0.6.1 2024-07-27 12:06:46 +00:00
tb/tbump
tc/tcsh
td
te Merge pull request #330579 from r-ryantm/auto-update/tenv 2024-07-28 10:43:11 -04:00
tg
th
ti tippecanoe: 2.56.0 -> 2.57.0 2024-07-27 11:32:39 +00:00
tk
tl
tm
to Merge pull request #327803 from Sigmanificient/toolong 2024-07-27 10:17:28 +09:00
tp
tr treewide: remove viric from meta.maintainers [no orphans] 2024-07-28 10:47:12 -03:00
ts/tsm-client
tt
tu
tw
tx/txr
ty
ub ubuntu-sans-mono: 1.004 -> 1.006 2024-07-28 04:07:34 +00:00
uc
ud
ue
ug
uh/uhttpmock_1_0
ui
um/umpire
un treewide: remove viric from meta.maintainers [no orphans] 2024-07-28 10:47:12 -03:00
up
ur/urban-cli
us
ut
uu/uuu
uv/uv
uw
ux uxn: 1.0-unstable-2024-06-15 -> 1.0-unstable-2024-07-26 2024-07-26 21:29:29 +00:00
va Merge pull request #329794 from ThePuzzlemaker/add-vatprism 2024-07-28 12:15:11 +05:30
vc
vd/vdhcoapp
ve
vg/vgm2x
vi
vk/vkd3d
vl
vm
vn
vo
vp
vs/vscode-js-debug
vu
vv/vvvvvv
vw/vwsfriend
vz/vzic
wa
wb
wc/wcurl
we
wf/wf-touch
wg/wg-access-server
wh
wi wiremock: 3.8.0 -> 3.9.1 2024-07-27 18:47:54 +00:00
wl
wo
wp
wr/wrangler
ws
wt
wv wvdial: init at unstable-2016-06-15 2024-07-27 19:11:02 +03:00
wx/wxc
wy/wyoming-satellite
x1/x16
x5/x509-limbo
xa
xc
xd
xe
xf/xfs-undelete
xh/xhosts
xi
xl
xm treewide: fix some comments (#330407) 2024-07-27 22:05:18 +08:00
xn/xnlinkfinder
xo
xp
xr
xs
xu/xunit-viewer
xv/xviewer
xw
ya yazi-unwrapped: auto update version, build date & hash 2024-07-28 13:06:52 +01:00
yc/ycmd
yd/ydotool
ye
yg/yggdrasil
yj/yj
yo
ys/ysfx
yt
yu
za
zb/zbus-xmlgen
zc/zcfan
ze
zf/zfind
zi
zl/zluda
zm/zmkBATx
zo
zp
zs
zu/zug
zw/zwave-js-server
zx
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 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;
}