Merge pull request #107778 from zowoq/containerd
containerd: misc fixes
This commit is contained in:
commit
f13837054b
@ -1,12 +1,16 @@
|
|||||||
{ lib, fetchFromGitHub, buildGoPackage, btrfs-progs, go-md2man, installShellFiles, util-linux, nixosTests }:
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
with lib;
|
, buildGoPackage
|
||||||
|
, btrfs-progs
|
||||||
|
, go-md2man
|
||||||
|
, installShellFiles
|
||||||
|
, util-linux
|
||||||
|
, nixosTests
|
||||||
|
}:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
pname = "containerd";
|
pname = "containerd";
|
||||||
version = "1.4.3";
|
version = "1.4.3";
|
||||||
# git commit for the above version's tag
|
|
||||||
commit = "269548fa27e0089a8b8278fc4fc781d7f65a939b";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "containerd";
|
owner = "containerd";
|
||||||
@ -22,29 +26,32 @@ buildGoPackage rec {
|
|||||||
|
|
||||||
buildInputs = [ btrfs-progs ];
|
buildInputs = [ btrfs-progs ];
|
||||||
|
|
||||||
buildFlags = [ "VERSION=v${version}" "REVISION=${commit}" ];
|
buildFlags = [ "VERSION=v${version}" "REVISION=${src.rev}" ];
|
||||||
|
|
||||||
BUILDTAGS = []
|
BUILDTAGS = [ ]
|
||||||
++ optional (btrfs-progs == null) "no_btrfs";
|
++ lib.optional (btrfs-progs == null) "no_btrfs";
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
cd go/src/${goPackagePath}
|
cd go/src/${goPackagePath}
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
make binaries $buildFlags
|
make binaries man $buildFlags
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
for b in bin/*; do
|
install -Dm555 bin/* -t $out/bin
|
||||||
install -Dm555 $b $out/$b
|
|
||||||
done
|
|
||||||
|
|
||||||
make man
|
|
||||||
installManPage man/*.[1-9]
|
installManPage man/*.[1-9]
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# completion installed separately so it can be overridden in docker
|
||||||
|
# can be moved to installPhase when docker uses containerd >= 1.4
|
||||||
|
postInstall = ''
|
||||||
|
installShellFiles --bash contrib/autocomplete/ctr
|
||||||
|
installShellFiles --zsh --name _ctr contrib/autocomplete/zsh_autocomplete
|
||||||
|
'';
|
||||||
|
|
||||||
passthru.tests = { inherit (nixosTests) docker; };
|
passthru.tests = { inherit (nixosTests) docker; };
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
homepage = "https://containerd.io/";
|
homepage = "https://containerd.io/";
|
||||||
description = "A daemon to control runC";
|
description = "A daemon to control runC";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
|
@ -41,6 +41,8 @@ rec {
|
|||||||
rev = containerdRev;
|
rev = containerdRev;
|
||||||
sha256 = containerdSha256;
|
sha256 = containerdSha256;
|
||||||
};
|
};
|
||||||
|
# disable completion, can be removed when docker uses containerd >= 1.4
|
||||||
|
postInstall = [];
|
||||||
# This should be removed once Docker uses containerd >=1.4
|
# This should be removed once Docker uses containerd >=1.4
|
||||||
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ lib.optional withlibseccomp pkgconfig;
|
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ lib.optional withlibseccomp pkgconfig;
|
||||||
buildInputs = oldAttrs.buildInputs ++ lib.optional withlibseccomp libseccomp;
|
buildInputs = oldAttrs.buildInputs ++ lib.optional withlibseccomp libseccomp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user