nixpkgs/pkgs/by-name
OTABI Tomoya c712a032fd
Merge pull request #286194 from raspher/scripthaus
scripthaus: init at 0.5.1
2024-02-14 13:18:11 +09:00
..
_4/_4th
_9/_9base
a4/a4
aa
ab/aba
ac
ad
ae
af
ai
al
am
an
ao/aocl-utils
ap
ar Merge pull request #286659 from NotAShelf/bump-arrpc 2024-02-13 11:02:42 +01:00
as
at
au
av/avr-sim
aw
ax/axmldec
ay
ba
bc/bc-ur
be
bi
bk/bk
bl
bm/bmake
bn/bngblaster
bo
br
bs/bsync
bu
by/bytecode-viewer
c2
c-
ca cargo-rdme: 1.4.2 -> 1.4.3 2024-02-13 08:00:03 +00:00
cb/cbmbasic
cc/ccache
cd
ce
cg/cgl
ch
ci
cl
cm
cn/cntb
co
cp
cr
cs
ct/ctx
cy
cz/czkawka
da/dark-mode-notify
db/dbus-cpp
dc/dc3dd
de
di
dj/djent
dm
do
dp/dpp
dr/drone-scp
ds Merge pull request #281250 from Gliczy/dsda-launcher 2024-02-13 19:28:16 +01:00
dt/dtcmp
du Merge pull request #276931 from 0x4A6F/master-dune3d 2024-02-13 03:30:11 +02:00
dv/dvb-apps
dx
dy
ea/easyeasm
eb
ec
ed/eduvpn-client eduvpn-client: 4.2.0 -> 4.2.1 2024-02-13 10:50:29 +01:00
ei
ek/eksctl
el elvish: 0.19.2 -> 0.20.0 2024-02-13 14:23:41 +01:00
em
en
er
es
eu
ex ext3grep: init at 0.10.2 2024-02-12 22:06:21 +01:00
ez/eza
fa
fb/fbset
fc
fe
ff
fi files-cli: 2.12.30 -> 2.12.31 2024-02-13 14:36:13 +01:00
fl
fm
fn/fnott
fo
fr Merge pull request #288071 from wegank/freefilesync-curl 2024-02-13 22:08:54 +01:00
fu/fuchsia-cursor
fw/fwupd
fy/fypp
ga
gb/gbar
gc
ge
gh
gi
gl glauth: drop obsolete excludedPackages 2024-02-13 09:57:08 +01:00
gm/gmic
go
gp
gr
gt
gu
h8/h8mail
ha
hd/hdrop
he
hi/hifile
hj/hjson-go
ho
ht scitoken-cpp -> scitokens-cpp (#288390) 2024-02-13 16:12:20 -05:00
hu/hugo
hy
i3
ia
ic
id/idsk
if/ifrextractor-rs
ig
ii
im
in
ir/ironbar
ja
jd/jdt-language-server
ji
jj/jj
jn/jnr-posix
jo
ju/justbuild
ka
kc/kconfig-frontends
kd/kdsingleapplication
ke
kg/kgeotag
ki
kl/klog-time-tracker
km/kmsvnc
ko
kp/kplex
ks/kseexpr
kt
ku
kx/kxstitch
la
lc/lcab
le
li libewf-legacy: fix pname 2024-02-12 20:20:11 +01:00
ll
ln/lngen
lo
ls/lshw
lu
lw/lwgrp
lz
m2
ma Merge pull request #267461 from KUD-00/init-marcel 2024-02-13 03:19:54 -08:00
mc
md
me menulibre: init at 2.2.3 2024-02-13 00:31:54 -03:00
mf/mfoc-hardnested
mg/mgitstatus
mi
mk
ml/mlx42
mo
mp/mpifileutils
mq/mqttx
ms
mu
my/mystmd mystmd: 1.1.38 -> 1.1.40 2024-02-13 01:40:04 +00:00
n2/n2
na
nc/ncdc
ne
nf/nfft
nh/nh
ni
nl
nm/nmap-parse
nn/nncp
no
np
nr
ns
nu numbat: 1.9.0 -> 1.10.1 2024-02-13 13:19:16 +01:00
nv
nw
oa
ob
oc
oe/oelint-adv
of/offpunk offpunk: 2.1 -> 2.2 2024-02-12 22:47:52 +01:00
oh/oh-my-fish
oi
on
op
or
ot
ou/outputcheck
ov
ow/owncloud-client
pa
pd
pe
pf/pfft
pg
ph
pi
pk/pkcrack
pl
pm
pn/pnfft
po
pp/ppsspp
pr
pt/pterm
pu
pw
px/pxder
py pyprland: 1.8.7 -> 1.10.2 2024-02-13 14:30:39 +01:00
pz/pzip
qa/qadwaitadecorations
qc/qcm
qg/qgrep
qr
qs
qt/qtractor
qu
ra
rc
re Merge pull request #285231 from tobim/pkgs/restinio-0.7.1 2024-02-13 16:41:24 -05:00
ri
rl/rl_json
rm/rmg
ro
rp/rpcs3
rq/rqbit
rs
rt/rtl-sdr-osmocom
ru
rw/rwpspread rwpspread: 0.1.8 -> 0.1.9 2024-02-13 03:50:24 +00:00
s3/s3scanner
sa satty: 0.8.3 -> 0.9.0 2024-02-13 08:35:44 +00:00
sc Merge pull request #286194 from raspher/scripthaus 2024-02-14 13:18:11 +09:00
sd
se
sg/sgfutils
sh shopware-cli: 0.4.22 -> 0.4.23 2024-02-13 14:24:51 +01:00
si
sl
sm
sn
so
sp
sq/sqlite-vss
sr
ss
st
su
sv
sw
sx
sy
ta
tc/tcsh
td/tdl
te
th
ti
tk/tkdiff
tl
tm/tmuxifier
to
tp
tr
tt/ttop
tu
tx/txr
ty
uc
ud
ue/uemacs
ui
um/umpire
un Merge pull request #258773 from nevivurn/feat/unison-fsmonitor-init 2024-02-12 19:47:42 +01:00
up
us/usql
ut/ut
uu/uuu
ux/uxn
va/valijson
vc
ve
vg/vgm2x
vi
vu/vulkan-volk
wa
wb/wb32-dfu-updater
we
wh
wi
wl
wo
wp/wp-cli
ws/wslay
wt/wtfis
x1/x16
xa/xarcan
xd
xf/xfs-undelete
xi/xib2nib
xm
xo
xp/xplr
xs
xw/xwayland-run
ya
ye
yg/yggdrasil
yj/yj
yo
yt
yu/yunfaavatar
za/zapzap
zb/zbus-xmlgen
zc/zcfan
ze/zesarux
zi
zo/zola
zp
zs/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

$ ./pkgs/test/nixpkgs-check-by-name/scripts/run-local.sh master

See here for more info.