2020-05-15 21:57:56 +00:00
|
|
|
{ lib, fetchFromGitHub, buildGoPackage, btrfs-progs, go-md2man, installShellFiles, utillinux }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "containerd";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "1.4.0";
|
2020-05-15 21:57:56 +00:00
|
|
|
# git commit for the above version's tag
|
|
|
|
commit = "7ad184331fa3e55e52b890ea95e65ba581ae3429";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containerd";
|
|
|
|
repo = "containerd";
|
|
|
|
rev = "v${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "1ajns679ck5yp6vmf39pyshzf8jijw5fcg5biixkj54jhj3bv1sq";
|
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-05-15 21:57:56 +00:00
|
|
|
nativeBuildInputs = [ go-md2man installShellFiles utillinux ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ btrfs-progs ];
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
buildFlags = [ "VERSION=v${version}" "REVISION=${commit}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
BUILDTAGS = []
|
|
|
|
++ optional (btrfs-progs == null) "no_btrfs";
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cd go/src/${goPackagePath}
|
|
|
|
patchShebangs .
|
2020-05-15 21:57:56 +00:00
|
|
|
make binaries $buildFlags
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
for b in bin/*; do
|
2020-05-15 21:57:56 +00:00
|
|
|
install -Dm555 $b $out/$b
|
2020-04-24 23:36:52 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
make man
|
2020-05-15 21:57:56 +00:00
|
|
|
installManPage man/*.[1-9]
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://containerd.io/";
|
|
|
|
description = "A daemon to control runC";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ offline vdemeester ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|