2020-12-29 15:07:52 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2021-06-28 23:13:55 +00:00
|
|
|
, buildGoModule
|
2020-12-29 15:07:52 +00:00
|
|
|
, btrfs-progs
|
|
|
|
, go-md2man
|
|
|
|
, installShellFiles
|
|
|
|
, util-linux
|
|
|
|
, nixosTests
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "containerd";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "1.6.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containerd";
|
|
|
|
repo = "containerd";
|
|
|
|
rev = "v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "sha256-cmarbad6VzcGTCHT/NtApkYsK/oo6WZQ//q8Fvh+ez8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
vendorSha256 = null;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-24 20:58:05 +00:00
|
|
|
nativeBuildInputs = [ go-md2man installShellFiles util-linux ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ btrfs-progs ];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
BUILDTAGS = lib.optionals (btrfs-progs == null) [ "no_btrfs" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
2021-08-05 21:33:18 +00:00
|
|
|
runHook preBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
patchShebangs .
|
2022-02-20 05:27:41 +00:00
|
|
|
make binaries "VERSION=v${version}" "REVISION=${src.rev}"
|
2021-08-05 21:33:18 +00:00
|
|
|
runHook postBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-08-05 21:33:18 +00:00
|
|
|
runHook preInstall
|
2020-12-29 15:07:52 +00:00
|
|
|
install -Dm555 bin/* -t $out/bin
|
2021-02-22 21:28:39 +00:00
|
|
|
installShellCompletion --bash contrib/autocomplete/ctr
|
|
|
|
installShellCompletion --zsh --name _ctr contrib/autocomplete/zsh_autocomplete
|
2021-08-05 21:33:18 +00:00
|
|
|
runHook postInstall
|
2020-12-29 15:07:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-11-24 20:58:05 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) docker; };
|
|
|
|
|
2020-12-29 15:07:52 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://containerd.io/";
|
|
|
|
description = "A daemon to control runC";
|
|
|
|
license = licenses.asl20;
|
2022-02-20 05:27:41 +00:00
|
|
|
maintainers = with maintainers; [ offline vdemeester endocrimes zowoq ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|