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";
|
2021-08-05 21:33:18 +00:00
|
|
|
version = "1.5.5";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containerd";
|
|
|
|
repo = "containerd";
|
|
|
|
rev = "v${version}";
|
2021-08-05 21:33:18 +00:00
|
|
|
sha256 = "sha256-6mDTTXHpXBcKOcT+VrGgt6HJzvTeKgJ0ItJ+IjCTJxk=";
|
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 .
|
2021-08-23 08:02:39 +00:00
|
|
|
make binaries man "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
|
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
|
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;
|
|
|
|
maintainers = with maintainers; [ offline vdemeester ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|