2020-12-29 15:07:52 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoPackage
|
|
|
|
, btrfs-progs
|
|
|
|
, go-md2man
|
|
|
|
, installShellFiles
|
|
|
|
, util-linux
|
|
|
|
, nixosTests
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "containerd";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "1.5.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containerd";
|
|
|
|
repo = "containerd";
|
|
|
|
rev = "v${version}";
|
2021-05-28 09:39:13 +00:00
|
|
|
sha256 = "sha256-jVyg+fyMuDnV/TM0Z2t+Cr17a6XBv11aWijhsqMnA5s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
goPackagePath = "github.com/containerd/containerd";
|
2020-05-15 21:57:56 +00:00
|
|
|
outputs = [ "out" "man" ];
|
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 ];
|
|
|
|
|
2020-12-29 15:07:52 +00:00
|
|
|
buildFlags = [ "VERSION=v${version}" "REVISION=${src.rev}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-29 15:07:52 +00:00
|
|
|
BUILDTAGS = [ ]
|
|
|
|
++ lib.optional (btrfs-progs == null) "no_btrfs";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cd go/src/${goPackagePath}
|
|
|
|
patchShebangs .
|
2020-12-29 15:07:52 +00:00
|
|
|
make binaries man $buildFlags
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2020-12-29 15:07:52 +00:00
|
|
|
install -Dm555 bin/* -t $out/bin
|
2020-05-15 21:57:56 +00:00
|
|
|
installManPage man/*.[1-9]
|
2021-02-22 21:28:39 +00:00
|
|
|
installShellCompletion --bash contrib/autocomplete/ctr
|
|
|
|
installShellCompletion --zsh --name _ctr contrib/autocomplete/zsh_autocomplete
|
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;
|
|
|
|
maintainers = with maintainers; [ offline vdemeester ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|