nixpkgs/pkgs/by-name
2024-03-02 00:56:19 +00:00
..
_4/_4th
_9/_9base
a4/a4
aa aaaaxy: 1.5.6 -> 1.5.23 2024-02-26 18:45:04 +01:00
ab/aba
ac
ad Merge pull request #280103 from reedrw/add-adwsteamgtk 2024-02-27 18:05:08 +00:00
ae
af
ai
al
am
an
ao/aocl-utils
ap apt: 2.7.12 -> 2.7.13 2024-02-29 10:51:21 +00:00
ar arcticons-sans: init at 0.580 2024-02-25 16:24:50 +00:00
as ast-grep: 0.19.2 -> 0.19.3 2024-02-27 10:16:02 +00:00
at atuin: 18.0.1 -> 18.0.2 2024-02-26 10:38:41 -08:00
au audiobookshelf: 2.7.2 -> 2.8.0 2024-02-28 16:30:40 +00:00
av/avr-sim
aw
ax/axmldec
ay
ba
bc/bc-ur
be
bi Merge pull request #288994 from r-ryantm/auto-update/bitmagnet 2024-02-28 12:39:46 +11:00
bk/bk
bl
bm/bmake
bn/bngblaster
bo
bp/bpftop bpftop: add myself as maintainer 2024-02-28 10:00:12 +01:00
br
bs/bsync
bu
by
c-
c2
ca Merge pull request #290968 from xrelkd/update/cargo-make 2024-02-28 08:44:40 -05:00
cb/cbmbasic
cc/ccache
cd
ce
cg/cgl
ch
ci
cl Merge pull request #291173 from chvp/upd/mu 2024-02-27 13:42:58 +01:00
cm cmake: add meta.mainProgram 2024-02-27 20:28:27 +02:00
cn/cntb cntb: 1.4.6 -> 1.4.8 2024-02-27 13:02:28 +01:00
co Merge pull request #292499 from GaetanLepage/codeium 2024-03-01 15:22:08 -05:00
cp
cr
cs
ct/ctx
cu/cursewords
cy
cz/czkawka
da
db/dbus-cpp
dc/dc3dd dc3dd: remove darwin support 2024-02-27 22:37:50 +01:00
dd/ddns-updater
de
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 edbrowse: enable Unix ODBC support 2024-02-25 19:32:14 -03:00
ei
ek/eksctl eksctl: 0.172.0 -> 0.173.0 2024-03-01 13:52:55 +00:00
el elf-info: init at 0.3.0 2024-02-27 09:40:27 +01:00
em emacspeak: 58.0 -> 59.0 2024-02-28 18:39:28 -03:00
en
er
es
eu
ex
ez/eza eza: 0.18.4 -> 0.18.5 2024-02-29 06:14:42 +01:00
fa
fb/fbset
fc fcitx5-rose-pine: init at 0-unstable-2024-03-01 2024-03-01 18:13:35 +13:00
fe
ff ffsubsync: refactor 2024-02-29 15:00:55 +01:00
fi files-cli: 2.12.38 -> 2.12.39 2024-02-27 13:55:31 +00:00
fl Merge pull request #291389 from r-ryantm/auto-update/flottbot 2024-02-29 12:11:22 +00:00
fm fm-go: init at 0.16.0 2024-02-25 18:17:56 -03:00
fn/fnott
fo
fr
fu/fuchsia-cursor
fw/fwupd fwupd: 1.9.13 -> 1.9.14 2024-02-27 10:24:28 +01:00
fy/fypp
ga
gb/gbar
gc
ge
gh
gi gickup: 0.10.27 -> 0.10.28 2024-02-28 11:15:25 +00:00
gl
gm/gmic
gn/gnucap
go Merge pull request #271189 from meain/go-errorlint 2024-02-29 15:10:22 +01:00
gp gpt4all: rename gpt4all-chat in gpt4all 2024-02-27 23:35:04 +01:00
gr
gt
gu
h8/h8mail
ha
hd/hdrop
he
hi/hifile
hj/hjson-go
ho home-manager: 0-unstable-2024-02-20 -> 0-unstable-2024-02-24 2024-02-26 15:18:13 -03:00
ht
hu/hugo hugo: 0.123.4 -> 0.123.6 2024-03-01 03:51:30 +00:00
hy Merge pull request #292117 from IogaMaster/hypridle 2024-02-28 17:40:41 +00:00
i3
ia
ic
id/idsk
if/ifrextractor-rs
ig
ii
im imhex: unstable-2023-10-01 -> 1.32.2 2024-02-27 12:03:08 +01:00
in Merge pull request #290959 from adamcstephens/incus/0.6 2024-02-28 13:35:03 -05:00
ip/ipam
ir/ironbar
it/itch
ja Merge pull request #291612 from r-ryantm/auto-update/jan 2024-02-26 19:07:44 +01:00
jd/jdt-language-server
ji
jj/jj
jn/jnr-posix
jo
js/jsoncons
ju/justbuild
ka
kc
kd/kdsingleapplication
ke
kg/kgeotag
ki
kl/klog-time-tracker
km/kmsvnc
kn/knossosnet
ko
kp/kplex
ks/kseexpr
kt
ku kubectl-validate: init at v0.0.1 2024-02-27 13:50:00 +01:00
kx/kxstitch
la
lc/lcab
le lefthook: 1.6.2 -> 1.6.4 2024-02-29 16:19:06 +00:00
li Merge pull request #291559 from RyanGibb/libvpl-opengl-driver-search 2024-03-01 13:46:06 +01:00
ll llama-cpp: 2249 -> 2294; bring upstream flake 2024-02-28 19:44:34 -05:00
ln/lngen
lo Merge pull request #289391 from Erethon/erethon-loramon 2024-02-28 08:50:09 +00:00
ls/lshw
lt/ltris ltris: 1.2.7 -> 1.2.8 2024-02-29 22:11:38 -03:00
lu lubelogger: 1.2.2 -> 1.2.3 2024-02-28 03:46:43 +00:00
lw/lwgrp
lz
m2
ma
mc
md mdsh: 0.7.0 -> 0.8.0 2024-02-29 15:37:32 +01:00
me Merge pull request #278454 from litchipi/mealie 2024-02-26 21:01:49 +00:00
mf mfcj880dw: init at 1.0.0-1 2024-02-29 02:15:41 +01:00
mg/mgitstatus
mi
mk
ml/mlx42
mo
mp/mpifileutils
mq/mqttx
ms msolve: 0.6.4 -> 0.6.5 2024-02-26 21:41:38 +00:00
mu
my Merge pull request #288956 from MatthewCroughan/mc/mycelium 2024-02-28 13:52:49 +02:00
n2/n2
na
nb/nbtscan
nc/ncdc
ne
nf/nfft
nh
ni nixfmt-rfc-style: 2024-01-31 -> 2024-03-01 2024-03-01 18:44:51 +01:00
nl
nm/nmap-parse
nn/nncp
no nosql-workbench: unpack with 7zz 2024-02-29 05:32:22 +01:00
np
nr
ns
nu Merge pull request #287511 from Aleksanaa/nulloy 2024-03-01 12:51:37 +01:00
nv
nw
oa
ob
oc
oe/oelint-adv oelint-adv: 4.4.0 -> 4.4.1 2024-02-28 05:47:09 +00:00
of/offpunk
oh/oh-my-fish
oi
on
op Merge pull request #292014 from lf-/jade/opengist 2024-03-01 23:31:26 +01:00
or
os
ot
ou Merge pull request #290945 from leahneukirchen/outils-0.13 2024-02-29 18:54:25 +01:00
ov
ow/owncloud-client
pa patch2pr: 0.21.0 -> 0.22.0 2024-02-27 16:22:02 +10:00
pd
pe
pf/pfft
pg
ph
pi
pk/pkcrack
pl
pm
pn/pnfft
po
pp/ppsspp
pr
pt
pu
pw
px/pxder
py pyprland: 2.0.3 -> 2.0.4 2024-02-26 17:16:13 +00:00
pz/pzip
qa/qadwaitadecorations
qc/qcm
qg/qgrep
qr
qs
qt/qtractor
qu
ra raspberrypi-eeprom: 2024.01.05-2712 -> 2024.02.16-271 2024-02-26 17:10:40 +01:00
rc
re Merge pull request #291749 from r-ryantm/auto-update/renode-unstable 2024-02-28 15:29:12 -05:00
ri
rl/rl_json
rm/rmg
ro roon-tui: init at 0.3.0 2024-02-28 20:34:12 -06:00
rp/rpcs3
rq/rqbit rqbit: 5.4.2 -> 5.5.0 2024-02-26 04:20:00 +00:00
rs rsgain: 3.4 -> 3.5 2024-02-26 05:46:08 +00:00
rt/rtl-sdr-osmocom
ru
rw/rwpspread
s3
sa satellite: init at 0.4.2 2024-02-25 13:52:10 +01:00
sc screenly-cli: add nix-update-script 2024-03-01 10:47:11 +00:00
sd
se searxng: set meta.mainProgram 2024-02-28 15:33:07 -08:00
sg/sgfutils
sh
si
sl
sm
sn
so
sp Merge pull request #261501 from Gerg-L/spotifywm 2024-03-01 22:27:34 +00:00
sq squirreldisk: fix build for aarch64-linux 2024-02-25 20:02:17 +01:00
sr
ss
st
su supersonic-wayland: 0.9.0 -> 0.9.1 2024-02-26 05:58:58 +00:00
sv
sw Merge pull request #287805 from raboof/sway-update-to-1.9 2024-02-29 12:06:52 +01:00
sx
sy
ta Merge pull request #291744 from ghthor/upstream-tabby 2024-02-29 21:46:32 +00:00
tc/tcsh
td/tdl
te
th
ti tippecanoe: add mainProgram 2024-03-01 22:20:50 +04:00
tk/tkdiff
tl
tm/tmuxifier
to
tp
tr Merge pull request #283660 from ocfox/transfer 2024-03-01 13:36:03 +01:00
tt/ttop
tu Merge pull request #282960 from LeSuisse/tuleap-cli-1.1.0 2024-02-27 09:03:23 -05:00
tx/txr
ty
uc
ud
ue ueberzugpp: 2.9.3 -> 2.9.4 2024-02-26 07:25:15 +01:00
ui uiua: add meta.updateScript 2024-02-29 00:40:59 +01:00
um/umpire
un Merge pull request #290078 from nevivurn/feat/unison-2.53.4 2024-02-28 19:49:45 +11:00
up
us/usql
ut/ut
uu/uuu
uv/uv uv: 0.1.12 -> 0.1.13 2024-02-29 04:20:00 +00:00
ux/uxn uxn: fix version string 2024-02-28 12:41:10 -03:00
va vault-unseal: init at 0.5.1 2024-02-27 06:54:44 -07:00
vc
ve
vg/vgm2x
vi
vl/vlc vlc: migrate to by-name 2024-02-26 17:40:16 -03:00
vu/vulkan-volk
wa waycheck: 1.1.0 -> 1.1.1 2024-03-01 13:39:54 +00:00
wb/wb32-dfu-updater
we
wh whistle: 2.9.64 -> 2.9.65 2024-02-26 05:59:25 +00:00
wi wit-bindgen: 0.19.1 -> 0.20.0 2024-03-01 03:17:30 +00:00
wl
wo
wp/wp-cli
ws/wslay
wt/wtfis
x1/x16
xa/xarcan
xc Merge pull request #269031 from TomaSajt/xclicker 2024-02-28 23:55:42 +01:00
xd xdg-utils-cxx: init at 1.0.1 2024-02-28 18:49:12 +03:00
xf/xfs-undelete
xi
xm
xo
xp/xplr
xr/xr-hardware
xs
xw/xwayland-run
ya yamlscript: init at 0.1.38 2024-02-26 18:37:23 +01:00
ye
yg/yggdrasil
yj/yj
yo
ys/ysfx
yt
yu/yunfaavatar
za/zapzap zapzap: 5.2 -> 5.2.1 2024-02-25 21:50:21 +00:00
zb/zbus-xmlgen zbus-xmlgen: 3.1.1 -> 4.0.1 2024-02-27 21:15:44 +01:00
zc/zcfan zcfan: 1.2.1 -> 1.3.0 2024-02-29 10:21:20 +00:00
ze/zesarux
zi
zo/zola
zp
zs/zs
zu/zug
zw/zwave-js-server
zx
README.md pkgs/by-name: recommendations for multi-versioned packages 2024-03-01 02:58:04 +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

$ ./pkgs/test/nixpkgs-check-by-name/scripts/run-local.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;