2020-05-09 18:24:03 -07:00
|
|
|
{ lib, fetchFromGitHub, buildGoPackage, btrfs-progs, go-md2man, installShellFiles, utillinux }:
|
2016-05-21 09:19:11 -07:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2018-12-20 05:25:24 -08:00
|
|
|
buildGoPackage rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "containerd";
|
2020-08-21 21:48:25 -07:00
|
|
|
version = "1.4.0";
|
2020-04-14 22:31:57 -07:00
|
|
|
# git commit for the above version's tag
|
|
|
|
commit = "7ad184331fa3e55e52b890ea95e65ba581ae3429";
|
2016-05-21 09:19:11 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-08-28 17:22:00 -07:00
|
|
|
owner = "containerd";
|
2016-05-21 09:19:11 -07:00
|
|
|
repo = "containerd";
|
|
|
|
rev = "v${version}";
|
2020-08-21 21:48:25 -07:00
|
|
|
sha256 = "1ajns679ck5yp6vmf39pyshzf8jijw5fcg5biixkj54jhj3bv1sq";
|
2016-05-21 09:19:11 -07:00
|
|
|
};
|
|
|
|
|
2018-12-20 05:25:24 -08:00
|
|
|
goPackagePath = "github.com/containerd/containerd";
|
2020-04-27 18:50:57 -07:00
|
|
|
outputs = [ "out" "man" ];
|
2018-12-20 05:25:24 -08:00
|
|
|
|
2020-05-09 18:24:03 -07:00
|
|
|
nativeBuildInputs = [ go-md2man installShellFiles utillinux ];
|
2020-03-17 09:28:03 -07:00
|
|
|
|
|
|
|
buildInputs = [ btrfs-progs ];
|
|
|
|
|
2020-04-14 22:31:57 -07:00
|
|
|
buildFlags = [ "VERSION=v${version}" "REVISION=${commit}" ];
|
2017-09-12 23:34:03 -07:00
|
|
|
|
|
|
|
BUILDTAGS = []
|
|
|
|
++ optional (btrfs-progs == null) "no_btrfs";
|
|
|
|
|
2018-12-20 05:25:24 -08:00
|
|
|
buildPhase = ''
|
|
|
|
cd go/src/${goPackagePath}
|
2017-09-12 23:34:03 -07:00
|
|
|
patchShebangs .
|
2020-04-14 22:31:57 -07:00
|
|
|
make binaries $buildFlags
|
2016-05-21 09:19:11 -07:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-12-20 05:25:24 -08:00
|
|
|
for b in bin/*; do
|
2020-04-27 18:50:57 -07:00
|
|
|
install -Dm555 $b $out/$b
|
2018-12-20 05:25:24 -08:00
|
|
|
done
|
|
|
|
|
|
|
|
make man
|
2020-05-09 18:24:03 -07:00
|
|
|
installManPage man/*.[1-9]
|
2016-05-21 09:19:11 -07:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://containerd.io/";
|
2016-05-21 09:19:11 -07:00
|
|
|
description = "A daemon to control runC";
|
|
|
|
license = licenses.asl20;
|
2018-08-20 07:36:48 -07:00
|
|
|
maintainers = with maintainers; [ offline vdemeester ];
|
2016-05-21 09:19:11 -07:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|