2021-08-10 10:37:20 +01:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoPackage
|
|
|
|
, btrfs-progs
|
|
|
|
, go-md2man
|
|
|
|
, installShellFiles
|
|
|
|
, util-linux
|
|
|
|
, nixosTests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "containerd";
|
2021-10-04 17:15:15 +01:00
|
|
|
version = "1.4.11";
|
2021-08-10 10:37:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containerd";
|
|
|
|
repo = "containerd";
|
|
|
|
rev = "v${version}";
|
2021-10-04 17:15:15 +01:00
|
|
|
sha256 = "sha256-mUagr1/LqTCFvshWuiSMxsqdRqjzogt2tZ0uwR7ZVAs=";
|
2021-08-10 10:37:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
goPackagePath = "github.com/containerd/containerd";
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ go-md2man installShellFiles util-linux ];
|
|
|
|
|
|
|
|
buildInputs = [ btrfs-progs ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cd go/src/${goPackagePath}
|
|
|
|
patchShebangs .
|
2021-08-22 05:29:06 +01:00
|
|
|
make binaries man "VERSION=v${version}" "REVISION=${src.rev}"
|
2021-08-10 10:37:20 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm555 bin/* -t $out/bin
|
|
|
|
installManPage man/*.[1-9]
|
|
|
|
installShellCompletion --bash contrib/autocomplete/ctr
|
|
|
|
installShellCompletion --zsh --name _ctr contrib/autocomplete/zsh_autocomplete
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.tests = { inherit (nixosTests) docker; };
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://containerd.io/";
|
|
|
|
description = "A daemon to control runC";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|