diff --git a/pkgs/applications/networking/cluster/nerdctl/default.nix b/pkgs/applications/networking/cluster/nerdctl/default.nix index 28f7b540722e..d11461366b61 100644 --- a/pkgs/applications/networking/cluster/nerdctl/default.nix +++ b/pkgs/applications/networking/cluster/nerdctl/default.nix @@ -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; }; }