ce641f4048
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildGoModule
|
|
, btrfs-progs
|
|
, go-md2man
|
|
, installShellFiles
|
|
, util-linux
|
|
, nixosTests
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "containerd";
|
|
version = "1.5.8";
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "containerd";
|
|
repo = "containerd";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-XIAByE2/eVG8DAZXstKs51LQYdVPcPQuIlST3xCclrU=";
|
|
};
|
|
|
|
vendorSha256 = null;
|
|
|
|
nativeBuildInputs = [ go-md2man installShellFiles util-linux ];
|
|
|
|
buildInputs = [ btrfs-progs ];
|
|
|
|
BUILDTAGS = lib.optionals (btrfs-progs == null) [ "no_btrfs" ];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
patchShebangs .
|
|
make binaries man "VERSION=v${version}" "REVISION=${src.rev}"
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -Dm555 bin/* -t $out/bin
|
|
installManPage man/*.[1-9]
|
|
installShellCompletion --bash contrib/autocomplete/ctr
|
|
installShellCompletion --zsh --name _ctr contrib/autocomplete/zsh_autocomplete
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.tests = { inherit (nixosTests) docker; };
|
|
|
|
meta = with lib; {
|
|
homepage = "https://containerd.io/";
|
|
description = "A daemon to control runC";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ offline vdemeester ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|