Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
79 lines
1.7 KiB
Nix
79 lines
1.7 KiB
Nix
{
|
|
buildah-unwrapped,
|
|
runCommand,
|
|
makeBinaryWrapper,
|
|
symlinkJoin,
|
|
lib,
|
|
stdenv,
|
|
extraPackages ? [ ],
|
|
runc, # Default container runtime
|
|
crun, # Container runtime (default with cgroups v2 for podman/buildah)
|
|
conmon, # Container runtime monitor
|
|
slirp4netns, # User-mode networking for unprivileged namespaces
|
|
fuse-overlayfs, # CoW for images, much faster than default vfs
|
|
util-linuxMinimal, # nsenter
|
|
iptables,
|
|
aardvark-dns,
|
|
netavark,
|
|
passt,
|
|
}:
|
|
|
|
let
|
|
binPath = lib.makeBinPath (
|
|
[
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
runc
|
|
crun
|
|
conmon
|
|
slirp4netns
|
|
fuse-overlayfs
|
|
util-linuxMinimal
|
|
iptables
|
|
]
|
|
++ extraPackages
|
|
);
|
|
|
|
helpersBin = symlinkJoin {
|
|
name = "${buildah-unwrapped.pname}-helper-binary-wrapper-${buildah-unwrapped.version}";
|
|
|
|
# this only works for some binaries, others may need to be added to `binPath` or in the modules
|
|
paths = [
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
aardvark-dns
|
|
netavark
|
|
passt
|
|
];
|
|
};
|
|
|
|
in
|
|
runCommand buildah-unwrapped.name
|
|
{
|
|
name = "${buildah-unwrapped.pname}-wrapper-${buildah-unwrapped.version}";
|
|
inherit (buildah-unwrapped) pname version passthru;
|
|
|
|
preferLocalBuild = true;
|
|
|
|
meta = removeAttrs buildah-unwrapped.meta [ "outputsToInstall" ];
|
|
|
|
outputs = [
|
|
"out"
|
|
"man"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
makeBinaryWrapper
|
|
];
|
|
|
|
}
|
|
''
|
|
ln -s ${buildah-unwrapped.man} $man
|
|
|
|
mkdir -p $out
|
|
ln -s ${buildah-unwrapped}/share $out/share
|
|
makeWrapper ${buildah-unwrapped}/bin/buildah $out/bin/buildah \
|
|
--set CONTAINERS_HELPER_BINARY_DIR ${helpersBin}/bin \
|
|
--prefix PATH : ${binPath}
|
|
''
|