Merge pull request #114001 from 06kellyjac/nerdctl

nerdctl: correct shas to match 0.6.0
This commit is contained in:
davidak 2021-02-22 15:47:24 +01:00 committed by GitHub
commit ed482686fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -15,10 +15,10 @@ buildGoModule rec {
owner = "AkihiroSuda"; owner = "AkihiroSuda";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-lSvYiTh67gK9kJls7VsayV8T3H6RzFEEKe49BOWnUBw="; sha256 = "sha256-QhAN30ge0dbC9dGT1yP4o0VgrcS9+g+r6YJ07ZjPJtg=";
}; };
vendorSha256 = "sha256-qywiaNoO3pI7sfyPbwWR8BLd86RvJ2xSWwCJUsm3RkM="; vendorSha256 = "sha256-bX1GfKbAbdEAnW3kPNsbF/cJWufxvuhm//G88qJ3u08=";
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
@ -30,6 +30,9 @@ buildGoModule rec {
"-X github.com/AkihiroSuda/nerdctl/pkg/version.Revision=<unknown>" "-X github.com/AkihiroSuda/nerdctl/pkg/version.Revision=<unknown>"
]; ];
# Many checks require a containerd socket and running nerdctl after it's built
doCheck = false;
postInstall = '' postInstall = ''
wrapProgram $out/bin/nerdctl \ wrapProgram $out/bin/nerdctl \
--prefix PATH : "${lib.makeBinPath ([ buildkit ] ++ extraPackages)}" \ --prefix PATH : "${lib.makeBinPath ([ buildkit ] ++ extraPackages)}" \
@ -39,6 +42,9 @@ buildGoModule rec {
doInstallCheck = true; doInstallCheck = true;
installCheckPhase = '' installCheckPhase = ''
runHook preInstallCheck runHook preInstallCheck
# nerdctl expects XDG_RUNTIME_DIR to be set
export XDG_RUNTIME_DIR=$TMPDIR
$out/bin/nerdctl --help $out/bin/nerdctl --help
# --version will error without containerd.sock access # --version will error without containerd.sock access
$out/bin/nerdctl --help | grep "${version}" $out/bin/nerdctl --help | grep "${version}"