apko: use checkflags and minor cleanup
Moved some attributes around and moved to skip via checkFlags rather than rm now we're on go 1.20
This commit is contained in:
parent
3b99ef4582
commit
bc4ec570ec
|
@ -12,7 +12,7 @@ buildGoModule rec {
|
||||||
owner = "chainguard-dev";
|
owner = "chainguard-dev";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-02W9YOnV/zXopH3C9UNKu5gepNVS2gzoGa10uaKYu94=";
|
hash = "sha256-02W9YOnV/zXopH3C9UNKu5gepNVS2gzoGa10uaKYu94=";
|
||||||
# populate values that require us to use git. By doing this in postFetch we
|
# populate values that require us to use git. By doing this in postFetch we
|
||||||
# can delete .git afterwards and maintain better reproducibility of the src.
|
# can delete .git afterwards and maintain better reproducibility of the src.
|
||||||
leaveDotGit = true;
|
leaveDotGit = true;
|
||||||
|
@ -24,7 +24,7 @@ buildGoModule rec {
|
||||||
find "$out" -name .git -print0 | xargs -0 rm -rf
|
find "$out" -name .git -print0 | xargs -0 rm -rf
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
vendorSha256 = "sha256-h1uAAL3FBskx6Qv9E5WY+UPeXK49WW/hFoNN4QyKevU=";
|
vendorHash = "sha256-h1uAAL3FBskx6Qv9E5WY+UPeXK49WW/hFoNN4QyKevU=";
|
||||||
|
|
||||||
nativeBuildInputs = [ installShellFiles ];
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
|
@ -41,14 +41,11 @@ buildGoModule rec {
|
||||||
ldflags+=" -X sigs.k8s.io/release-utils/version.buildDate=$(cat SOURCE_DATE_EPOCH)"
|
ldflags+=" -X sigs.k8s.io/release-utils/version.buildDate=$(cat SOURCE_DATE_EPOCH)"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preCheck = ''
|
checkFlags = [
|
||||||
# disable tests that require network access
|
# networking required to fetch alpine-keys
|
||||||
rm pkg/apk/impl/implementation_test.go
|
# pulled out into a separate library next release
|
||||||
'';
|
"-skip=TestInitDB"
|
||||||
|
];
|
||||||
doCheck = true;
|
|
||||||
|
|
||||||
doInstallCheck = true;
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
installShellCompletion --cmd apko \
|
installShellCompletion --cmd apko \
|
||||||
|
@ -57,6 +54,7 @@ buildGoModule rec {
|
||||||
--zsh <($out/bin/apko completion zsh)
|
--zsh <($out/bin/apko completion zsh)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
doInstallCheck = true;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
runHook preInstallCheck
|
runHook preInstallCheck
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue