nixpkgs/pkgs/by-name/ru/runc/package.nix
Sascha Grunert 473f4fef08 runc: 1.1.15 -> 1.3.0
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2025-08-18 10:12:22 +02:00

81 lines
1.5 KiB
Nix

{
lib,
fetchFromGitHub,
buildGoModule,
go-md2man,
installShellFiles,
pkg-config,
which,
libapparmor,
libseccomp,
libselinux,
runtimeShell,
makeWrapper,
nixosTests,
}:
buildGoModule rec {
pname = "runc";
version = "1.3.0";
src = fetchFromGitHub {
owner = "opencontainers";
repo = "runc";
tag = "v${version}";
hash = "sha256-oXoDio3l23Z6UyAhb9oDMo1O4TLBbFyLh9sRWXnfLVY=";
};
vendorHash = null;
outputs = [
"out"
"man"
];
nativeBuildInputs = [
go-md2man
installShellFiles
makeWrapper
pkg-config
which
];
buildInputs = [
libselinux
libseccomp
libapparmor
];
makeFlags = [
"BUILDTAGS+=seccomp"
"SHELL=${runtimeShell}"
];
buildPhase = ''
runHook preBuild
patchShebangs .
make ${toString makeFlags} runc man
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 runc $out/bin/runc
installManPage man/*/*.[1-9]
wrapProgram $out/bin/runc \
--prefix PATH : /run/current-system/systemd/bin
runHook postInstall
'';
passthru.tests = { inherit (nixosTests) cri-o docker podman; };
meta = with lib; {
homepage = "https://github.com/opencontainers/runc";
description = "CLI tool for spawning and running containers according to the OCI specification";
license = licenses.asl20;
maintainers = with maintainers; [ offline ];
teams = [ teams.podman ];
platforms = platforms.linux;
mainProgram = "runc";
};
}