nixpkgs/pkgs/by-name
2024-10-15 21:04:01 +02:00
..
_0
_1
_2/_2ship2harkinian
_4
_6/_64gram
_9
a4/a4
a5/a52dec
aa
ab
ac
ad adcskiller: init at 0-unstable-2024-05-19 (#344732) 2024-10-11 00:24:06 +02:00
ae aerospace: init at 0.14.2-Beta (#344015) 2024-10-12 11:38:46 +01:00
af
ag
ai aider-chat: 0.57.0 -> 0.59.0 2024-10-11 15:59:42 +08:00
al alpaca: 2.6.0 -> 2.6.5 2024-10-14 15:50:38 +08:00
am treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
an
ao/aocl-utils
ap treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
aq/aquamarine aquamarine: 0.4.1 -> 0.4.3 2024-10-14 16:27:37 +01:00
ar arc-browser: 1.61.2-54148 -> 1.63.1-54714 2024-10-13 14:09:32 +03:00
as astro-language-server: 2.14.2 -> 2.15.0 (#347261) 2024-10-09 21:06:36 +02:00
at nixos/atticd: init module (#347749) 2024-10-14 09:33:35 -04:00
au audiobookshelf: enable nusqlite3 extension 2024-10-14 12:51:55 +00:00
av
aw treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
ax
ay
az azpainter: add darwin bundle 2024-10-15 18:46:24 +04:00
b3/b3sum
ba batik: 1.17 -> 1.18 2024-10-13 21:56:46 +00:00
bc bcachefs-tools: 1.11.0 -> 1.13.0 2024-10-11 12:16:49 +02:00
bd
be
bi biglybt: 3.6.0.0 -> 3.7.0.0 (#346682) 2024-10-10 17:32:10 +00:00
bk/bk
bl Merge master into staging-next 2024-10-09 00:14:24 +00:00
bm
bn/bngblaster bngblaster: 0.9.7 -> 0.9.8 2024-10-09 04:49:05 +00:00
bo boundary: 0.17.1 -> 0.18.0 2024-10-14 16:19:36 -04:00
bp
bq/bqn
br
bs
bt
bu buf: 1.44.0 -> 1.45.0 2024-10-14 02:06:04 +00:00
by
c-
c2
c3/c3-lsp
ca castxml: nixfmt 2024-10-14 21:31:51 +00:00
cb
cc
cd
ce
cf
cg
ch treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
ci treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
cj/cjs
cl cloak-pt: 2.9.0 -> 2.10.0 2024-10-14 03:25:23 +00:00
cm
cn
co consul: 1.19.2 -> 1.20.0 2024-10-14 21:58:28 -04:00
cp cpplint: 1.7.0 -> 2.0.0 2024-10-11 23:49:34 +02:00
cq/cq
cr crow: init at 1.2 2024-10-13 07:42:53 +02:00
cs
ct/ctx
cu
cv/cvemap
cw/cwe-client-cli
cy
cz/czkawka czkawka: add versionCheckHook 2024-10-12 22:03:02 +02:00
da darcs-to-git: 0-unstable-2024-02-20 -> 0-unstable-2024-09-30 (#346980) 2024-10-10 19:17:50 -04:00
db treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
dc
dd
de treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
dg
dh/dhcpig
di dinit: 0.19.0 -> 0.19.1 2024-10-15 02:36:49 +00:00
dj/djent
dm
dn
do treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
dp
dr druid: use mirror url 2024-10-09 12:03:59 +02:00
ds dsp: fix build with ffmpeg7 2024-10-14 20:41:18 +03:00
dt
du
dv
dw
dx
dy
e1/e1s
ea easytier: 2.0.0 -> 2.0.3 2024-10-13 21:52:28 +08:00
eb
ec
ed
ee/eepers
ef
eg/eg25-manager
ei eiwd: 2.16-1 -> 2.22-1 2024-10-09 12:35:49 +00:00
ej
ek
el
em
en treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
eo/eog
ep
er
es eslint_d: Move to pkgs/by-name/ folder 2024-10-13 16:45:17 +02:00
et
eu eudev.meta.pkgConfigModules: init 2024-10-13 11:49:07 +02:00
ev
ew
ex exo: 0-unstable-2024-10-06 -> 0-unstable-2024-10-09 2024-10-09 18:54:01 +02:00
ey/eyewitness
ez/eza eza: 0.20.1 -> 0.20.2 2024-10-09 09:50:07 +02:00
f2/f2fs-tools
fa
fb/fbset
fc fcp: fix build (#344988) 2024-10-14 16:00:23 +08:00
fd/fdroidserver
fe feather: 2.6.8 -> 2.7.0 (#348504) 2024-10-14 12:19:05 +00:00
ff
fg/fgqcanvas
fi figma-linux: 0.11.4 -> 0.11.5 2024-10-10 18:10:26 -03:00
fj/fjo
fl fluxcd: 2.3.0 -> 2.4.0 (#345690) 2024-10-09 10:27:12 +02:00
fm
fn/fnott
fo treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
fr freeplane: disable parallel building 2024-10-09 22:36:11 +07:00
fs
ft Merge master into staging-next 2024-10-10 12:05:39 +00:00
fu
fv
fw/fwupd
fx/fx
fy
fz
g-/g-wrap
g3/g3kb-switch
ga gat: 0.18.0 -> 0.19.1 2024-10-15 11:54:30 +00:00
gb
gc
gd
ge gerrit: 3.10.1 -> 3.10.2 2024-10-11 22:59:34 +02:00
gf
gg/gg Revert "gg-jj: init at 0.20.0" 2024-10-11 02:25:22 +01:00
gh
gi git-prole: init at 0.1.1 2024-10-13 20:58:06 -07:00
gk/gk-cli
gl glab: 1.45.0 -> 1.47.0 2024-10-09 19:45:00 +02:00
gm
gn gnome-settings-daemon: add withSystemd option 2024-10-13 11:51:39 +02:00
go gomanagedocker: init at 1.4 (#347300) 2024-10-12 13:24:59 +02:00
gp treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
gr greenmask: 0.1.14 -> 0.2.0 2024-10-10 04:18:59 +00:00
gs/gscan2pdf
gt
gu
gv/gvisor
gx
gz/gzdoom gzdoom: 4.12.2 -> 4.13.0 2024-10-12 12:33:52 +02:00
h2/h2
h5/h5utils
h8/h8mail
ha harper: 0.11.0 -> 0.12.0 (#348383) 2024-10-14 13:01:28 -04:00
hb/hb-honeypot
hc/hclfmt
hd
he treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
hi
hj/hjson-go
hn/hn-text
ho homebox: 0.13.0 -> 0.15.2 2024-10-10 20:48:07 +02:00
hp
hr/hred
ht
hu
hv/hvm
hw/hwinfo
hx/hxtools
hy hydra: 0-unstable-2024-09-24 -> 0-unstable-2024-10-08 (#347872) 2024-10-13 14:51:07 +02:00
i2/i2p
i3
ia
ic ice-bar: 0.9.0 -> 0.11.9 2024-10-13 15:41:18 +03:00
id
if
ig
ii
ij
im immersed-vr: rename to immersed 2024-10-08 11:38:51 -07:00
in treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
io
ip
ir
is
it
iu/iucode-tool
iv
iw
iz/izrss
j/j
ja
jc/jcli
jd/jdt-language-server
je
ji
jj/jj
jn
jo josm: 19207 → 19230 2024-10-10 21:25:07 +02:00
jp/jp-zip-codes
jq/jq-zsh-plugin
jr
js
jt/jtdx
ju justbuild: use default version of protobuf 2024-10-14 08:14:46 +02:00
jw/jwasm
k8/k8s-manifest-sigstore
ka
kb/kbld
kc kcl: 0.9.8 -> 0.10.0 (#345613) 2024-10-10 10:27:57 +02:00
kd
ke keyguard: 1.6.1 -> 1.6.2 (#347050) 2024-10-14 01:36:57 +02:00
kg/kgeotag
ki treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
kl
km kmod-blacklist-ubuntu: 30+20230519-1ubuntu3 -> 31+20240202-2ubuntu8 2024-10-11 15:32:17 +02:00
kn knxd: 0.14.61 -> 0.14.63 2024-10-14 15:30:17 +00:00
ko koboldcpp: add meta.homepage 2024-10-12 12:49:52 +03:00
kp/kplex
kr
ks
kt
ku
kv/kvmarwaita
kw/kwok
kx
ky
la
lb
lc
ld
le legcord: 1.0.0 -> 1.0.1 2024-10-12 14:00:31 -05:00
lg/lgogdownloader
li libvpl: 2.10.1 -> 2.13.0 (#347328) 2024-10-13 10:59:04 -06:00
lk/lk-jwt-service
ll
lm lmstudio: 0.3.3 -> 0.3.4 2024-10-13 13:36:17 -05:00
ln/lngen
lo localsend: fix window visibility 2024-10-14 10:20:35 -07:00
lp
lr/lrcget treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
ls
lt/ltris
lu luakit: hammer 2024-10-13 12:12:05 -03:00
lv/lv_font_conv
lw
lx lxgw-wenkai-screen: 1.330 -> 1.501 2024-10-11 06:03:21 +00:00
lz
m1/m1ddc
m2
ma materialgram: 5.5.4.1 -> 5.6.1.1 (#347192) 2024-10-08 16:02:53 -04:00
mb
mc
md
me Merge master into staging-next 2024-10-13 00:15:27 +00:00
mf
mg
mi mingtest: 0.1.9 -> 0.2.1 2024-10-14 03:01:14 +00:00
mj/mjmap
mk
ml/mlx42
mo modprobed-db: 2.47 -> 2.48 2024-10-14 15:18:33 +00:00
mp
mq
mr/mricron
ms
mt mtxclient: move to by-name and reformat 2024-10-11 12:40:38 +02:00
mu Merge master into staging-next 2024-10-10 18:04:46 +00:00
my mycelium: 0.5.5 -> 0.5.6 2024-10-09 13:27:37 +00:00
n2/n2
n8/n8n
n9/n98-magerun2
na maintainers/team-list: add ngi team (#344669) 2024-10-15 21:04:01 +02:00
nb nbdkit: init at 1.40.4 2024-10-09 17:08:41 +02:00
nc
nd
ne netscanner: 0.5.3 -> 0.6.0 (#347882) 2024-10-14 11:44:52 +02:00
nf
ng
nh nheko: move to by-name and reformat 2024-10-11 12:40:39 +02:00
ni nimdow: 0.7.38 -> 0.7.39 (#348488) 2024-10-15 07:59:51 +02:00
nl
nm
nn
no notmuch-mailmover: 0.3.0 -> 0.4.0 (#345530) 2024-10-14 01:40:26 +02:00
np
nr
ns
nt
nu nufmt: modernize; add update script; unstable-2023-09-25 -> 0-unstable-2024-10-15 (#348627) 2024-10-15 19:17:42 +02:00
nv nvrh: 0.1.12 -> 0.1.13 2024-10-13 17:23:28 +02:00
nw
nx/nxengine-evo
ny/nym
nz nzbget: 24.2 -> 24.3 2024-10-12 16:05:14 -05:00
oa
ob
oc
od
oe/oelint-adv
of
og/oguri
oh
oi oink: 1.3.0 -> 1.3.1 2024-10-12 23:02:03 -07:00
ok
ol
om
on
oo
op open62541: 1.4.4 -> 1.4.6 (#346691) 2024-10-14 01:19:46 +02:00
oq/oqs-provider oqs-provider: fix hash for retagged 0.7.0 2024-10-13 16:57:36 -06:00
or
os osu-lazer-bin: fix hash for the second time 2024-10-10 21:05:09 +02:00
ot
ou
ov treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
ow
p3/p3x-onenote
pa
pb/pb
pc
pd pdfarranger: 1.11.0 -> 1.11.1 2024-10-14 09:27:15 +02:00
pe pest: 2.34.7 -> 3.3.1 (#347922) 2024-10-13 10:23:27 +02:00
pf
pg
ph
pi picom: v12.2 -> v12.3 2024-10-14 18:05:58 +02:00
pk
pl plex-desktop: remove version from desktop exec 2024-10-14 15:40:17 +02:00
pm
pn
po treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
pp/ppsspp
pq
pr prowler: 3.16.11 -> 4.3.7 2024-10-14 15:31:41 +02:00
ps
pt
pu
pv
pw
px/pxder
py pylyzer: 0.0.65 -> 0.0.66 2024-10-15 19:09:57 +02:00
pz/pzip
qa/qadwaitadecorations
qb/qbittorrent-enhanced
qc/qcm
qd qdiskinfo: refactor themes 2024-10-10 23:03:16 +01:00
qe/qemu_xen
qg
qm
qn/qnial
qo/qodem
qp/qpoases
qq/qq
qr
qs
qt
qu
qw/qwerty-fr
r0/r0vm
r1/r10k
ra radicale: 3.2.3 -> 3.3.0 2024-10-14 12:17:59 +02:00
rc
rd/rdwatool
re reactphysics3d: 0.10.1 -> 0.10.2 2024-10-15 07:45:36 +00:00
rf/rfdump
rh
ri
rk
rl/rl_json
rm
rn
ro
rp
rq
rr/rrdtool
rs
rt
ru rustic: 0.8.1 -> 0.9.1 (#346508) 2024-10-08 12:07:39 +02:00
rw/rwpspread
rx/rxvt
ry
s0/s0ix-selftest-tool
s3
sa nixos/saunafs: add module + test (#347337) 2024-10-14 09:24:51 +02:00
sb
sc schemamap: 0.3.0 -> 0.4.0 2024-10-10 03:53:51 +00:00
sd
se seabios refactors (#342692) 2024-10-14 10:59:18 +02:00
sf sfcgal: 1.5.2 -> 2.0.0 2024-10-14 01:51:10 +00:00
sg/sgfutils
sh shadps4: 0.3.0-unstable-2024-10-13 -> 0.3.0-unstable-2024-10-14 2024-10-15 02:43:24 +00:00
si
sk
sl
sm
sn snipe-it: 7.0.12 -> 7.0.13 2024-10-15 09:11:35 +02:00
so soundwireserver: remove unused unzip dependency 2024-10-14 22:59:30 +00:00
sp spotube: 3.8.2 -> 3.8.3 2024-10-09 18:40:45 +02:00
sq treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
sr
ss ssm-session-manager-plugin: 1.2.650.0 -> 1.2.677.0 2024-10-15 10:35:00 +00:00
st stats: quote paths 2024-10-13 20:46:14 +03:00
su supermariowar: Fix GUI applications wrapping (#346941) 2024-10-14 01:38:15 +02:00
sv svt-av1-psy: 2.2.1-A -> 2.2.1-B 2024-10-11 06:03:27 +00:00
sw
sx
sy syft: 1.13.0 -> 1.14.0 2024-10-09 05:51:50 +00:00
t-/t-rex
ta maintainers/team-list: add ngi team (#344669) 2024-10-15 21:04:01 +02:00
tb/tbump
tc
td
te telegraf: 1.32.0 -> 1.32.1 2024-10-12 17:54:53 +10:00
tg
th
ti tinymist: 0.11.28 -> 0.11.32 2024-10-09 21:40:40 +02:00
tk
tl
tm
to tomato-c: 2023-8-21 → 2024-4-19 (#347360) 2024-10-14 01:44:06 +02:00
tp
tr treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
ts
tt ttop: format with nixfmt 2024-10-13 23:22:33 +02:00
tu
tw twitch-cli: move to by-name 2024-10-08 12:02:09 +02:00
tx
ty
u-/u-config
ub
uc
ud
ue
ug
uh/uhttpmock_1_0
ui
um/umpire
un unrar-free: 0.3.0 -> 0.3.1 2024-10-14 05:34:42 +00:00
up upbound: 0.33.0 -> 0.34.0 2024-10-09 01:59:28 +00:00
ur
us userborn: 0.2.0 -> 0.3.0 (#347952) 2024-10-12 11:17:23 +02:00
ut
uu/uuu
uv/uv uv: 0.4.11 -> 0.4.20 2024-10-13 17:57:06 +02:00
uw
ux uxplay: 1.69 -> 1.70 2024-10-09 21:13:00 +00:00
va vault-bin: 1.17.6 -> 1.18.0 2024-10-09 01:33:31 -04:00
vc
vd/vdhcoapp
ve vencord: 1.10.3 -> 1.10.4 2024-10-09 08:14:18 +00:00
vf/vfkit
vg
vi
vk
vl
vm
vn
vo
vp vpp: init at 24.06 2024-10-12 16:30:19 +02:00
vr/vrcadvert
vs
vu
vv/vvvvvv
vw/vwsfriend
vy/vyxal
vz/vzic
wa wakapi: 2.12.0 -> 2.12.1 (#348376) 2024-10-14 13:05:07 -04:00
wb
wc
we weblate: fix version constraints 2024-10-13 17:30:40 +02:00
wf/wf-touch
wg wgpu-utils: 0.16.1 -> 22.1.0, move to pkgs/by-name 2024-10-11 14:39:58 +02:00
wh whoami: init at 1.10.3 2024-10-15 10:50:45 +01:00
wi
wl
wo
wp
wr/wrangler
ws
wt
wu/wush
wv
wx/wxc
wy/wyoming-satellite
x1/x16
x5/x509-limbo
xa
xc
xd
xe
xf/xfs-undelete
xh/xhosts
xi treewide: replace webkitgtk to webkitgtk_4_0 2024-10-11 17:23:43 -06:00
xl
xm
xn/xnlinkfinder
xo
xp
xr
xs
xt/xtf
xu/xunit-viewer
xv/xviewer
xw
ya
yc/ycmd
yd/ydotool
ye
yg
yj/yj
yo yofi: fix build (#344811) 2024-10-14 15:58:51 +08:00
yp/ypbind-mt
ys/ysfx
yt ytdownloader: 3.18.2 -> 3.18.3 2024-10-11 08:51:36 +00:00
yu
za
zb/zbus-xmlgen
zc
ze zed-editor: 0.156.1 -> 0.156.2 2024-10-15 08:33:26 +02:00
zf/zfind
zi
zl/zluda
zm/zmkBATx
zo
zp
zs
zu
zw/zwave-js-server
zx
zy/zydis
zz/zziplib
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 attribute name corresponding to the package, and so is the lowercase 2-letter prefix of the attribute 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. Since it would take a lot of contributor and reviewer time to migrate all packages manually, an automated migration is planned, though it is expected to still take some time to get done. If you're interested in helping out with this effort, please see this ticket.

Since only PRs to packages in pkgs/by-name can be automatically merged, if package maintainers would like to use this feature, they are welcome to migrate their packages to pkgs/by-name. To lessen PR traffic, they're encouraged to also perform some more general maintenance on the package in the same PR, though this is not required and must not be expected.

Note that callPackage definitions in all-packages.nix with custom arguments should not be removed. That is a backwards-incompatible change because it changes the .override interface. Such packages may still be moved to pkgs/by-name however, in order to avoid the slightly superficial choice of directory / category in which the default.nix file was placed, but please keep the definition in all-packages.nix using callPackage. See also changing implicit attribute defaults.

Definitions like the following however, can be transitioned:

# all-packages.nix
fooWithBaz = foo.override {
  bar = baz;
};
# turned into pkgs/by-name/fo/fooWithBaz/package.nix with:
{
  foo,
  baz,
}:

foo.override {
  bar = baz;
}

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-vet tool.

You can locally emulate the CI check using

$ ./ci/nixpkgs-vet.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;
}