nixpkgs/pkgs/by-name
nixpkgs-merge-bot[bot] 7d892036b0
Merge pull request #300040 from r-ryantm/auto-update/ryujinx
ryujinx: 1.1.1242 -> 1.1.1248
2024-04-03 04:09:09 +00:00
..
_4/_4th
_6/_64gram _64gram: init at 1.1.15 2024-04-02 16:29:37 +05:30
_9/_9base
a4/a4
a5/a52dec
aa
ab/aba
ac
ad
ae
af
ag/ags
ai
al
am
an
ao/aocl-utils
ap
ar
as ast-grep: 0.20.0 -> 0.20.2 2024-04-02 07:04:04 +00:00
at
au
av
aw
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
bk/bk
bl
bm/bmake
bn/bngblaster
bo boxbuddy: 2.1.5 -> 2.2.0 2024-04-01 10:49:28 +08:00
bp/bpftop
br
bs/bsync
bt/bt-migrate
bu
by
c2
c-
ca cargo-information: init at 0.4.2 2024-04-02 08:43:02 +01:00
cb
cc/ccache
cd
ce
cg
ch
ci
cl
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
ct/ctx
cu
cv/cvemap
cy
cz/czkawka
da Merge pull request #293826 from drupol/daytona/init 2024-04-02 20:55:21 +02:00
db/dbus-cpp
dc/dc3dd
dd
de
dg/dgoss
di
dj/djent
dm
dn/dns2tcp
do
dp/dpp
dr/drone-scp
ds
dt/dtcmp
du
dv/dvb-apps
dx
dy
ea/easyeasm
eb
ec
ed
ei
ek/eksctl
el
em
en
ep/epub-thumbnailer
er
es
et
eu
ex
ez/eza
fa fantomas: 6.3.0 -> 6.3.1 2024-04-02 11:55:44 +02:00
fb/fbset
fc
fe
ff
fi
fl Merge pull request #299431 from Assistant/init-flye 2024-04-01 18:47:24 +02:00
fm
fn/fnott
fo
fr
fs
fu/fuchsia-cursor
fv
fw/fwupd
fy/fypp
g3/g3kb-switch
ga
gb/gbar
gc
ge
gg/gg
gh gh-f: init at 1.1.5 2024-04-02 14:02:54 +00:00
gi Merge pull request #298087 from andersrh/upgrade-github-desktop 2024-04-01 16:16:32 +02:00
gl
gm
gn
go Merge pull request #283654 from terrorbyte/pkg-go-bare-gen 2024-04-02 01:10:00 +02:00
gp
gr
gt
gu
gx/gxml
h8/h8mail
ha
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
ht
hu/hugo
hy
i3
ia
ic
id
if/ifrextractor-rs
ig
ii
im
in Merge pull request #283958 from cideM/init-inflow 2024-04-02 19:27:52 +08:00
io/ioq3-scion
ip
ir/ironbar
it
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
js/jsoncons
ju
ka
kc
kd/kdsingleapplication
ke
kg/kgeotag
ki
kl/klog-time-tracker
km
kn/knossosnet
ko
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
lb
lc/lcab
le lexical: init at 0.5.2 2024-04-02 09:31:24 +02:00
li libtoxcore: restore meta.platforms 2024-04-01 18:43:37 +02:00
ll
lm/lmstudio
ln/lngen
lo
lp
ls
lt/ltris
lu
lw/lwgrp
lx lxgw-neoxihei: move to pkgs/by-name 2024-04-01 19:48:04 +02:00
lz
m2
ma maa-cli: license agpl3Plus -> agpl3Only 2024-04-03 03:26:51 +08:00
mb/mbpoll
mc
md
me Merge pull request #284885 from averagebit/add-meg 2024-04-02 19:59:43 +08:00
mf
mg/mgitstatus
mi Merge pull request #300170 from r-ryantm/auto-update/miru 2024-04-02 00:00:55 +02:00
mk
ml/mlx42
mo
mp/mpifileutils
mq
ms
mu
my
n2/n2
na
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
no
np
nr
ns
nt/ntfs2btrfs
nu
nv
nw
oa
ob
oc nixos/ocis: init at 5.0.0 2024-04-03 00:53:24 +05:30
oe/oelint-adv
of offat: init at 0.16.0 2024-04-01 21:03:18 +02:00
oh/oh-my-fish
oi
ol/olvid
om/omniorbpy
on
op
or
os
ot
ou
ov
ow
pa
pd
pe
pf/pfft
pg
ph
pi pingme: init at 0.2.6 2024-04-02 12:33:50 +11:00
pk/pkcrack
pl
pm
pn
po
pp/ppsspp
pq
pr
pt
pu
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
rd/rdwatool
re Merge pull request #298740 from felixsinger/pkgs/redmine/rework 2024-04-01 18:17:17 +00:00
ri
rk/rkbin
rl/rl_json
rm/rmg
ro
rp/rpcs3
rq/rqbit
rs
rt/rtl-sdr-osmocom
ru
rw/rwpspread
ry/ryujinx
s3
sa
sc
sd
se
sg/sgfutils
sh
si simdutf: 5.0.0 -> 5.2.0 2024-04-02 03:46:28 +00:00
sl
sm
sn sn-pro: init at 1.1.0 2024-03-31 15:20:54 -07:00
so
sp
sq
sr
ss
st stats: 2.10.5 -> 2.10.6 2024-04-01 19:07:47 +03:00
su
sv
sw
sx
sy
t-/t-rex
ta
tc/tcsh
td/tdl
te
tg/tgpt
th
ti Merge pull request #291129 from blinry/tic-80 2024-04-01 13:54:39 +02:00
tk/tkdiff
tl
tm/tmuxifier
to toxic: fix license 2024-04-01 00:10:33 +02:00
tp
tr
tt/ttop
tu
tx/txr
ty typstyle: 0.11.5 -> 0.11.8 2024-04-01 09:59:54 +02:00
uc
ud
ue
ug/ugrep-indexer
ui
um/umpire
un
up
us/usql
ut
uu/uuu
uv/uv
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
vg/vgm2x
vi
vl
vu
wa wayland-pipewire-idle-inhibit: 0.5.0 -> 0.5.1 2024-04-02 07:04:07 +00:00
wb/wb32-dfu-updater
we
wh
wi wiremock: 3.4.2 -> 3.5.2 2024-04-02 06:02:55 +00:00
wl
wo
wp/wp-cli
ws
wt/wtfis
wy/wyoming-satellite
x1/x16
x5/x509-limbo
xa/xarcan
xc
xd
xe
xf/xfs-undelete
xi
xm
xo
xp/xplr
xr/xr-hardware
xs
xw/xwayland-run
ya
ye
yg/yggdrasil
yj/yj
yo
ys/ysfx
yt
yu
za
zb/zbus-xmlgen zbus-xmlgen: 4.0.1 -> 4.1.0 2024-04-01 09:36:23 +02:00
zc/zcfan
ze/zesarux
zi
zo/zola
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;
}