nerdctl: 0.5.0 -> 0.6.0

- nixpkgs-fmt
- add installCheckPhase
- hardcode homepage
- add changelog
- sort meta
This commit is contained in:
06kellyjac 2021-02-19 09:55:05 +00:00
parent ad4db3f4d8
commit 1f1f14f523

View file

@ -4,17 +4,12 @@
, makeWrapper
, buildkit
, cni-plugins
, extraPackages ? []
, extraPackages ? [ ]
}:
let
binPath = lib.makeBinPath ([
buildkit
] ++ extraPackages);
in
buildGoModule rec {
pname = "nerdctl";
version = "0.5.0";
version = "0.6.0";
src = fetchFromGitHub {
owner = "AkihiroSuda";
@ -37,15 +32,25 @@ buildGoModule rec {
postInstall = ''
wrapProgram $out/bin/nerdctl \
--prefix PATH : "${binPath}" \
--prefix PATH : "${lib.makeBinPath ([ buildkit ] ++ extraPackages)}" \
--prefix CNI_PATH : "${cni-plugins}/bin"
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/nerdctl --help
# --version will error without containerd.sock access
$out/bin/nerdctl --help | grep "${version}"
runHook postInstallCheck
'';
meta = with lib; {
homepage = "https://github.com/AkihiroSuda/nerdctl/";
changelog = "https://github.com/AkihiroSuda/nerdctl/releases/tag/v${version}";
description = "A Docker-compatible CLI for containerd";
homepage = src.meta.homepage;
license = licenses.asl20;
platforms = platforms.linux;
maintainers = with maintainers; [ jk ];
platforms = platforms.linux;
};
}