nerdctl: init at 0.2.0

This commit is contained in:
06kellyjac 2020-12-13 12:22:45 +00:00 committed by zowoq
parent e1451c8858
commit 54121ff317
2 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,51 @@
{ lib
, buildGoModule
, fetchFromGitHub
, makeWrapper
, buildkit
, cni-plugins
, extraPackages ? []
}:
let
binPath = lib.makeBinPath ([
buildkit
] ++ extraPackages);
in
buildGoModule rec {
pname = "nerdctl";
version = "0.2.0";
src = fetchFromGitHub {
owner = "AkihiroSuda";
repo = pname;
rev = "v${version}";
sha256 = "181qapqgp7zd0imk0zkn4wzpsw292ai2yz9pbiirpjcjx9h26w5h";
};
vendorSha256 = "0scywhllxk1m6456wggdmn7sgvy5x3gz2xnyfq9jnvvzap8byr2v";
nativeBuildInputs = [ makeWrapper ];
buildFlagsArray = [
"-ldflags="
"-w"
"-s"
"-X github.com/AkihiroSuda/nerdctl/pkg/version.Version=v${version}"
"-X github.com/AkihiroSuda/nerdctl/pkg/version.Revision=<unknown>"
];
postInstall = ''
wrapProgram $out/bin/nerdctl \
--prefix PATH : "${binPath}" \
--prefix CNI_PATH : "${cni-plugins}/bin"
'';
meta = with lib; {
description = "A Docker-compatible CLI for containerd";
homepage = src.meta.homepage;
license = licenses.asl20;
platforms = platforms.linux;
maintainers = with maintainers; [ jk ];
};
}

View File

@ -5311,6 +5311,8 @@ in
ncrack = callPackage ../tools/security/ncrack { };
nerdctl = callPackage ../applications/networking/cluster/nerdctl { };
netdata = callPackage ../tools/system/netdata {
inherit (darwin.apple_sdk.frameworks) CoreFoundation IOKit;
};