nixpkgs/pkgs/by-name
2024-08-29 08:51:59 +08:00
..
_0/_0xpropo
_2/_2ship2harkinian
_4
_6/_64gram
_9/_9base
a4/a4
a5/a52dec
aa aaaaxy: 1.5.173 -> 1.5.183 2024-08-26 12:31:53 +00:00
ab
ac
ad adwaita-icon-theme-legacy: init at 46.2 2024-08-26 12:57:50 +05:30
ae aegisub: change --replace to --replace-fail 2024-08-27 16:33:29 +02:00
af
ag
ai Merge pull request from jtojnar/gnome-top-level 2024-08-24 01:43:31 +02:00
al ffmpeg_4: almost drop () 2024-08-27 22:08:20 +02:00
am amazon-ssm-agent: 3.3.551.0 -> 3.3.808.0 2024-08-27 12:39:14 +00:00
an ananicy-rules-cachyos: 0-unstable-2024-07-27 -> 0-unstable-2024-08-26 () 2024-08-28 10:02:53 +05:30
ao/aocl-utils
ap application-title-bar: 0.7.0 -> 0.7.2 2024-08-26 01:00:43 +00:00
aq/aquamarine
ar arkenfox-userjs: 126.1 -> 128.0 2024-08-26 19:55:09 +08:00
as ast-grep: 0.24.1 -> 0.26.3 2024-08-27 07:36:42 +00:00
at Merge pull request from jtojnar/gnome-top-level 2024-08-24 01:43:31 +02:00
au
av
aw aws-sso-cli: skip broken TestServerWithSSL 2024-08-21 20:46:51 -05:00
ax
ay
az
b3/b3sum
ba swig1, swig2: remove () 2024-08-26 15:16:02 +01:00
bc
bd
be betterdiscordctl: substitute --replace with --replace-fail 2024-08-25 17:59:23 +02:00
bi bitrise: 2.19.0 -> 2.20.0 2024-08-26 06:25:50 +00:00
bk/bk
bl Merge pull request from TomaSajt/blastem 2024-08-26 11:44:49 +05:30
bm/bmake
bn/bngblaster
bo
bp
bq/bqn
br
bs
bt
bu bup: 0.33.3 -> 0.33.4 () 2024-08-27 08:12:48 +02:00
by
c2
c-
ca Merge pull request from jtojnar/gnome-top-level 2024-08-24 01:43:31 +02:00
cb
cc
cd
ce Merge pull request from superherointj/ceph-csi-refactor 2024-08-23 15:33:29 -03:00
cg
ch chatzone-desktop: init at 5.2.1 () 2024-08-27 16:52:39 +02:00
ci cinny-desktop: 4.0.3 -> 4.1.0, use hashRouter () 2024-08-27 05:17:18 +01:00
cj/cjs
cl clash-verge-rev: 1.7.5 -> 1.7.7; clash-verge-rev: build from source; clash-verge-rev: add bot-wxt1221 as maintainers 2024-08-29 08:51:59 +08:00
cm
cn
co cosmic-applets: remove env substituteInPlace 2024-08-26 18:52:33 +02:00
cp
cq/cq
cr crabfit-api: fix Rust 1.80.0 build regression 2024-08-24 21:58:48 +02:00
cs
ct/ctx
cu Merge pull request from Pandapip1/init-cups-idprt 2024-08-22 15:00:07 +02:00
cv/cvemap
cy
cz/czkawka
da
db
dc
dd
de deploy-rs: unstable-2024-02-16 -> 0-unstable-2024-06-12 2024-08-25 11:26:19 +08:00
dg/dgoss
dh/dhcpig
di diesel-cli: 2.2.1 -> 2.2.3 () 2024-08-26 18:28:43 -04:00
dj/djent
dm
dn
do downonspot: 0.5.1 -> 0.6.0 2024-08-27 00:44:14 +00:00
dp
dr
ds
dt
du dummyhttp: 1.0.3 -> 1.1.0 2024-08-23 12:37:46 +00:00
dv/dvb-apps
dw
dx
dy
e1/e1s
ea
eb
ec
ed
ee/eepers
ef/efibootmgr
eg/eg25-manager
ei Merge pull request from r-ryantm/auto-update/eigenlayer 2024-08-23 15:17:58 -04:00
ej/ejsonkms
ek/eksctl
el
em
en
eo/eog
ep
er eris-go: 20240128 -> 20240826 2024-08-27 05:00:44 +00:00
es
et
eu
ev
ew/eww
ex
ey/eyewitness
ez/eza
f2/f2fs-tools
fa tree-wide: remove eelco as maintainer from things he no longer maintains () 2024-08-26 20:39:56 +02:00
fb/fbset
fc
fe feishin: use electron_31 2024-08-23 00:59:01 +01:00
ff ffmpeg-normalize: move to pkgs/by-name 2024-08-28 11:03:35 +02:00
fg/fgqcanvas
fi firefly-iii-data-importer: init at 1.5.4 2024-08-28 08:29:32 +02:00
fj/fjo
fl flatpak: fix icon validation test () 2024-08-27 14:09:53 +02:00
fm fmtoy: 0-unstable-2024-06-07 -> 0-unstable-2024-06-11 () 2024-08-28 10:12:53 +02:00
fn/fnott
fo footage: init at 1.3.2 () 2024-08-27 11:57:31 +02:00
fr frankenphp: 1.2.4 -> 1.2.5 2024-08-28 00:56:55 +00:00
fs
ft/fte
fu
fv
fw/fwupd fwupd: 1.9.23 -> 1.9.24 2024-08-22 13:59:12 +02:00
fx/fx
fy fyne: 2.5.0 -> 2.5.1 2024-08-25 21:25:44 +00:00
fz
g3/g3kb-switch
ga gatus: 5.11.0 -> 5.12.0 2024-08-27 12:56:58 +00:00
gb
gc
gd gdm-settings: fix eval 2024-08-24 02:17:34 +02:00
ge getmail6: 6.19.03 -> 6.19.04 2024-08-25 13:15:08 -07:00
gf Merge pull request from r-ryantm/auto-update/gfal2 2024-08-22 23:20:49 -04:00
gg/gg
gh
gi gitwatch: init at v0.2 2024-08-27 07:35:47 +00:00
gk/gk-cli
gl glasskube: 0.16.0 -> 0.17.0 2024-08-26 16:45:46 -07:00
gm gmid: 2.1 -> 2.1.1 2024-08-25 13:04:26 +00:00
gn gnome-notes: Fix updateScript 2024-08-26 19:46:52 +08:00
go maintainers: remove superherointj () 2024-08-27 01:08:06 +01:00
gp
gr grafana-alloy: 1.3.0 -> 1.3.1 2024-08-27 21:23:42 +02:00
gt Merge pull request from jtojnar/gnome-top-level 2024-08-24 01:43:31 +02:00
gu Merge pull request from museoa/guile-sqlite3 2024-08-23 17:12:41 -03:00
gv/gvisor
gx/gxml
h2/h2
h5/h5utils
h8/h8mail
ha hatch: use python3Packages 2024-08-25 19:04:58 -07:00
hb/hb-honeypot
hc/hclfmt hclfmt: 2.21.0 -> 2.22.0 2024-08-26 13:03:28 +00:00
hd
he heptabase: 1.35.3 -> 1.35.4 () 2024-08-26 18:52:08 -04:00
hi Merge pull request from jtojnar/gnome-top-level 2024-08-24 01:43:31 +02:00
hj/hjson-go
hn/hn-text
ho
hp
ht
hu
hv/hvm
hw/hwinfo hwinfo: add updater 2024-08-21 22:38:35 +02:00
hx/hxtools hxtools: init at 20231224 2024-08-25 15:01:04 +02:00
hy hyprland: fixed broken OpenGL on asahi linux 2024-08-25 03:15:27 -07:00
i2/i2p i2p: 2.6.0 -> 2.6.1 2024-08-25 19:52:56 +02:00
i3
ia
ic
id
if
ig
ii
ij
im immich-go: 1.21.3 -> 0.22.0 2024-08-27 10:51:15 +00:00
in Merge pull request from returntoreality/indi-3rdparty-refactor 2024-08-25 23:09:21 +05:30
io
ip
ir
is isc-cron: adopt and wash 2024-08-23 12:22:22 -03:00
it
iv
iw/iw
iz/izrss
ja
jc/jcli
jd/jdt-language-server
je jellyfin: 10.9.7 -> 10.9.10 2024-08-25 16:48:30 +02:00
ji
jj/jj
jn
jo
jq/jq-zsh-plugin
jr Merge pull request from I-Al-Istannen/pkg/jreleaser-cli 2024-08-23 16:46:46 +02:00
js
jt/jtdx
ju
jw/jwasm
ka kanidm-provision: 1.1.1 -> 1.1.2 2024-08-23 20:46:03 +02:00
kc
kd
ke
kg/kgeotag
ki musly: add patches for FFmpeg 7, C++17, and external deps; kissfft: build with CMake; libresample: 0.1.3 -> 0.1.4-unstable-2024-08-23 () 2024-08-27 01:12:57 +01:00
kl
km
kn
ko koboldcpp: 1.73 -> 1.73.1 2024-08-25 07:23:49 +00:00
kp/kplex
kr
ks
kt
ku
kv/kvmarwaita
kx
ky
la labwc-menu-generator: 0-unstable-2024-05-27 -> 0.1.0-unstable-2024-07-09 2024-08-25 12:16:44 -03:00
lb
lc
ld
le legba: fix darwin build () 2024-08-27 09:07:46 -04:00
lg/lgogdownloader lgogdownloader: 3.14 -> 3.15 2024-08-23 17:14:12 +00:00
li musly: add patches for FFmpeg 7, C++17, and external deps; kissfft: build with CMake; libresample: 0.1.3 -> 0.1.4-unstable-2024-08-23 () 2024-08-27 01:12:57 +01:00
lk/lk-jwt-service
ll llama-cpp: 3565 -> 3620 2024-08-24 21:41:17 +00:00
lm lmstudio: 0.2.31 -> 0.3.1 2024-08-25 22:33:10 +02:00
ln/lngen
lo loopwm: 1.0.0 -> 1.1.1 2024-08-27 17:31:10 +01:00
lp
lr/lrcget
ls lsd: 1.1.3 -> 1.1.5 2024-08-26 13:01:33 +00:00
lt/ltris
lu lubelogger: 1.3.5 -> 1.3.6 2024-08-27 01:21:16 +00:00
lv/lv_font_conv
lw/lwgrp
lx lx-music-desktop: 2.8.0 -> 2.9.0 2024-08-24 15:45:48 +08:00
lz
m1/m1ddc
m2
ma maa-cli: 0.4.11 -> 0.4.12 () 2024-08-28 04:01:53 +00:00
mb
mc
md md-tui: 0.8.5 -> 0.8.6 2024-08-28 09:05:54 +02:00
me meteor-git: 0.22.0 -> 0.23.0 () 2024-08-28 03:00:28 +00:00
mf
mg
mi minijinja: 2.1.2 -> 2.2.0 2024-08-26 21:16:57 +00:00
mk
ml/mlx42
mo mosdepth: 0.3.8 -> 0.3.9 2024-08-28 01:22:07 +00:00
mp
mq
mr/mricron
ms
mu musly: add patches for FFmpeg 7, C++17, and external deps; kissfft: build with CMake; libresample: 0.1.3 -> 0.1.4-unstable-2024-08-23 () 2024-08-27 01:12:57 +01:00
my
n2/n2
n8/n8n n8n: make deterministic, decrease closure size 2024-08-25 01:40:03 +02:00
n9/n98-magerun2
na nanopb: fix build by resolving name collision () 2024-08-26 21:23:31 +01:00
nb nbqa: 1.8.7 -> 1.9.0 () 2024-08-27 20:03:19 +02:00
nc
nd/ndstrim
ne neural-amp-modeler-lv2: 0.1.3 -> 0.1.4 2024-08-24 22:28:48 +00:00
nf
ng
nh
ni
nl
nm
nn
no
np
nr nrr: 0.9.4 -> 0.9.5 2024-08-26 07:22:01 +00:00
ns
nt
nu
nv
nw
nx/nxengine-evo
nz Merge pull request from devusb/nzbget 2024-08-22 13:55:17 +02:00
oa oama: init at 0.14 2024-08-24 11:09:55 +12:00
ob
oc
od
oe/oelint-adv
of
oh
oi
ok okteto: 2.30.1 -> 2.30.2 2024-08-26 17:32:54 +00:00
ol
om
on
oo
op opshin: 0.22.0 -> 0.23.0 2024-08-27 12:20:32 +00:00
oq/oqs-provider
or orchard: 0.22.0 -> 0.22.1 2024-08-22 03:21:58 +00:00
os
ot oterm: 0.2.9 -> 0.4.2 2024-08-23 17:19:09 +00:00
ou
ov ovn: 24.03.2 -> 24.03.3 2024-08-24 12:50:52 +00:00
ow
pa Merge pull request from helsinki-systems/fix/parmetis-archive-org 2024-08-21 21:41:51 +01:00
pc pcsx2: 2.1.17 -> 2.1.102 2024-08-21 20:00:48 -03:00
pd Merge pull request from fgaz/pdf4tcl/init 2024-08-22 13:39:59 +02:00
pe petsc: moved mpiSupport flag to passthru 2024-08-24 12:10:31 +00:00
pf/pfft
pg
ph
pi
pk
pl
pm pmbootstrap: fix darwin build 2024-08-23 16:51:16 +01:00
pn
po powerpipe: 0.4.2 -> 0.4.3 2024-08-25 07:54:18 +00:00
pp/ppsspp
pq
pr protoc-gen-tonic: 0.4.0 -> 0.4.1, protoc-gen-prost: 0.3.1 -> 0.4.0, protoc-gen-prost-serde: 0.3.0 -> 0.3.1, protoc-gen-prost-crate: 0.4.0 -> 0.4.1 () 2024-08-27 16:31:43 +00:00
ps
pt
pu
pv
pw
px/pxder
py pytr: init at 0.2.2 2024-08-25 12:40:26 -07:00
pz/pzip
qa/qadwaitadecorations
qb/qbittorrent-enhanced
qc/qcm qcm: 1.0.4 -> 1.0.5 2024-08-26 12:21:11 +08:00
qd
qg/qgrep
qm/qmplay2
qn/qnial
qo/qodem
qp/qpoases
qq/qq
qr
qs qsv: init at 0.131.1 2024-08-22 17:40:46 -04:00
qt/qtractor
qu Merge pull request from jtojnar/gnome-top-level 2024-08-24 01:43:31 +02:00
qw/qwerty-fr
r0/r0vm
r1/r10k
ra rathole: 0.5.0 -> 0.5.0-unstable-2024-06-06 () 2024-08-27 14:09:38 +02:00
rc rcp: 0.11.0 -> 0.12.0 2024-08-26 23:52:33 +00:00
rd/rdwatool
re renovate: 38.46.2 -> 38.55.4 2024-08-27 19:15:01 +00:00
rf/rfdump
rh/rHttp
ri
rk box64: 0.2.8 -> 0.3.0 () 2024-08-27 16:34:12 +02:00
rl/rl_json
rm
rn
ro roddhjav-apparmor-rules: 0-unstable-2024-08-06 -> 0-unstable-2024-08-26 2024-08-26 20:23:57 +00:00
rp/rpcs3 rpcs3: 0.0.32-16833-981a1c56f -> 0.0.32-16857-1c16ada67 2024-08-23 14:22:33 +00:00
rq rquickshare: 0.10.2 -> 0.11.2 2024-08-23 04:15:07 +00:00
rr/rrdtool
rs
rt rtorrent: 0.9.8-unstable-2024-08-09 -> 0.9.8-unstable-2024-08-20 2024-08-24 09:50:08 +00:00
ru ffmpeg_4: almost drop () 2024-08-27 22:08:20 +02:00
rw/rwpspread
ry ryujinx: 1.1.1376 -> 1.1.1379 2024-08-26 03:51:04 +00:00
s0/s0ix-selftest-tool s0ix-selftest-tool: 0-unstable-2024-08-13 -> 0-unstable-2024-08-20 2024-08-23 21:41:33 +00:00
s3
sa sabnzbd: 4.3.2 -> 4.3.3 2024-08-26 18:48:07 +00:00
sb sby: Fix description. Remove duplicated inputs. --replace-fail instead of --replace. Be specific about which files patchShebangs is applied to. Run hooks in installPhase. Use btor2tools as input now that is updated 2024-08-24 16:33:28 -05:00
sc scs: 3.2.3 -> 3.2.7 2024-08-24 19:25:17 +02:00
sd Merge pull request from reckenrode/SDL_image-fixes 2024-08-23 15:38:58 +02:00
se Merge pull request from sephii/seventeenlands 2024-08-26 11:46:47 +08:00
sf/sfwbar
sg/sgfutils
sh Merge pull request from getchoo/pkgs/showtime/init 2024-08-26 11:52:13 +08:00
si silicon: patch Cargo.lock for Rust 1.80 2024-08-26 18:54:22 +03:00
sk skypeforlinux: adopt 2024-08-22 09:56:07 +00:00
sl slumber: 1.5.0 -> 1.8.1 2024-08-25 14:57:10 +02:00
sm
sn
so so: 0.4.9 -> 0.4.10 2024-08-23 18:33:59 -03:00
sp spicetify-cli: 2.37.2 -> 2.37.4 2024-08-25 15:09:28 -06:00
sq
sr
ss
st nixos/streamcontroller: init, streamcontroller: init at 1.5.0-beta.6-unstable-2024-08-13, pythonPackages.usb-monitor: init at 1.21 () 2024-08-28 11:38:05 +02:00
su Merge pull request from siriobalmelli/sb/fix/surrealdb 2024-08-22 21:44:12 +00:00
sv
sw sway-overfocus: 0.2.3-fix -> 0.2.4 2024-08-24 04:10:44 +00:00
sx
sy syndicate-server: init 0.46.0 2024-08-27 11:47:19 +00:00
t-/t-rex
ta Merge pull request from jtojnar/gnome-top-level 2024-08-24 01:43:31 +02:00
tb/tbump
tc Merge pull request from fgaz/tcludp/init 2024-08-22 13:38:59 +02:00
td Merge pull request from fgaz/tdom/init 2024-08-22 13:40:16 +02:00
te templ: 0.2.747 -> 0.2.771 () 2024-08-27 10:55:22 +00:00
tg
th
ti tinymist: 0.11.19 -> 0.11.20 2024-08-26 20:55:50 +02:00
tk
tl
tm
to
tp
tr trealla: 2.55.22 -> 2.55.25 2024-08-26 19:34:16 +00:00
ts/tsm-client
tt
tu
tw
tx
ty typst-lsp: move to pkgs/by-name 2024-08-22 13:24:07 +02:00
ub
uc
ud
ue
ug
uh/uhttpmock_1_0
ui uiua: 0.12.2 -> 0.12.3 2024-08-28 04:02:55 +00:00
um/umpire
un
up
ur/urban-cli
us
ut
uu/uuu
uv/uv uv: 0.3.3 -> 0.3.5 2024-08-28 00:57:06 +00:00
uw
ux
va
vc maintainers: remove superherointj 2024-08-26 17:50:54 -03:00
vd/vdhcoapp
ve
vg vgm2x: 0.0.0-unstable-2023-08-27 -> 0-unstable-2024-06-18 () 2024-08-28 10:13:26 +02:00
vi vimcats: init at 1.0.2 2024-08-28 11:10:07 +02:00
vk
vl
vm
vn
vo
vp
vs
vu
vv/vvvvvv
vw/vwsfriend
vz/vzic
wa warp-terminal: Add Aarch64 support 2024-08-28 02:43:20 +02:00
wb
wc/wcurl
we werf: 2.10.3 -> 2.10.4 2024-08-25 08:59:33 +00:00
wf/wf-touch
wg/wg-access-server
wh
wi wiseunpacker: init at 1.3.3 () 2024-08-26 07:29:45 -07:00
wl
wo wowup-cf: 2.12.0 -> 2.20.0 2024-08-23 02:48:58 +00:00
wp
wr/wrangler
ws
wt
wv
wx/wxc
wy/wyoming-satellite
x1/x16
x5/x509-limbo
xa
xc
xd
xe Merge pull request from fabaff/xeol-darwin 2024-08-25 09:23:46 +02:00
xf/xfs-undelete
xh/xhosts
xi
xl
xm
xn/xnlinkfinder
xo
xp
xr
xs
xu/xunit-viewer
xv/xviewer
xw
ya yandex-music: init at 5.13.2 2024-08-27 13:04:04 +00:00
yc/ycmd
yd/ydotool
ye
yg
yj/yj
yo youki: move to pkgs/by-name 2024-08-24 14:42:22 +02:00
ys/ysfx
yt
yu yubico-piv-tool: reformat and migrate to pkgs/by-name 2024-08-25 11:39:30 +02:00
za
zb/zbus-xmlgen
zc
ze zed-editor: 0.149.5 -> 0.149.6 2024-08-27 15:02:01 +02:00
zf/zfind
zi
zl/zluda
zm/zmkBATx
zo
zp zpaqfranz: 60.5 -> 60.6 2024-08-26 00:38:15 +00:00
zs
zu
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;
}