Files
nixpkgs/pkgs/by-name/co/containerd/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

106 lines
2.0 KiB
Nix

{
lib,
stdenv,
pkgsCross,
btrfs-progs,
buildGoModule,
fetchFromGitHub,
go-md2man,
kubernetes,
nix-update-script,
nixosTests,
util-linux,
btrfsSupport ? btrfs-progs != null,
withMan ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
}:
buildGoModule rec {
pname = "containerd";
version = "2.1.4";
outputs = [
"out"
"doc"
]
++ lib.optional withMan "man";
src = fetchFromGitHub {
owner = "containerd";
repo = "containerd";
tag = "v${version}";
hash = "sha256-eC9mfB/FWDxOGucNizHBiRkhkEFDdSxu9vRnXZp5Tug=";
};
postPatch = "patchShebangs .";
vendorHash = null;
strictDeps = true;
nativeBuildInputs = [
util-linux
]
++ lib.optional withMan go-md2man;
buildInputs = lib.optional btrfsSupport btrfs-progs;
tags = lib.optional (!btrfsSupport) "no_btrfs";
makeFlags = [
"PREFIX=${placeholder "out"}"
"BUILDTAGS=${toString tags}"
"REVISION=${src.rev}"
"VERSION=v${version}"
];
installTargets = [
"install"
"install-doc"
]
++ lib.optional withMan "install-man";
buildPhase = ''
runHook preBuild
make $makeFlags
runHook postBuild
'';
installPhase = ''
runHook preInstall
make $makeFlags $installTargets
runHook postInstall
'';
passthru = {
tests = lib.optionalAttrs stdenv.hostPlatform.isLinux (
{
cross =
let
systemString = if stdenv.buildPlatform.isAarch64 then "gnu64" else "aarch64-multiplatform";
in
pkgsCross.${systemString}.containerd;
inherit (nixosTests) docker;
}
// kubernetes.tests
);
updateScript = nix-update-script { };
};
meta = {
description = "Daemon to control runC";
homepage = "https://containerd.io/";
changelog = "https://github.com/containerd/containerd/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
offline
vdemeester
getchoo
];
mainProgram = "containerd";
platforms = lib.platforms.linux;
};
}