mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 11:22:58 +00:00
apko: 0.4.0 -> 0.8.0 (#228007)
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
This commit is contained in:
parent
f902e5b602
commit
bbf921352f
@ -6,13 +6,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "apko";
|
||||
version = "0.4.0";
|
||||
version = "0.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "chainguard-dev";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-gmBcN1lxzkkRpiUUWv87ji/G4Uy3DA8a6+6Qs+p/2mg=";
|
||||
sha256 = "sha256-02W9YOnV/zXopH3C9UNKu5gepNVS2gzoGa10uaKYu94=";
|
||||
# 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.
|
||||
leaveDotGit = true;
|
||||
@ -24,7 +24,7 @@ buildGoModule rec {
|
||||
find "$out" -name .git -print0 | xargs -0 rm -rf
|
||||
'';
|
||||
};
|
||||
vendorSha256 = "sha256-3gRECgKvGqkgBzB3SSxm6/LxZG8RxhjoC6Q7DZj/Has=";
|
||||
vendorSha256 = "sha256-h1uAAL3FBskx6Qv9E5WY+UPeXK49WW/hFoNN4QyKevU=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
@ -42,11 +42,14 @@ buildGoModule rec {
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
# requires network access to fetch alpine linux keyring
|
||||
substituteInPlace pkg/apk/apk_unit_test.go \
|
||||
--replace "TestInitKeyring" "SkipInitKeyring"
|
||||
# disable tests that require network access
|
||||
rm pkg/apk/impl/implementation_test.go
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd apko \
|
||||
--bash <($out/bin/apko completion bash) \
|
||||
@ -54,11 +57,12 @@ buildGoModule rec {
|
||||
--zsh <($out/bin/apko completion zsh)
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
|
||||
$out/bin/apko --help
|
||||
$out/bin/apko version 2>&1 | grep "v${version}"
|
||||
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
@ -67,6 +71,6 @@ buildGoModule rec {
|
||||
changelog = "https://github.com/chainguard-dev/apko/blob/main/NEWS.md";
|
||||
description = "Build OCI images using APK directly without Dockerfile";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ jk ];
|
||||
maintainers = with maintainers; [ jk developer-guy ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user