1 { lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, oras }:
7 src = fetchFromGitHub {
8 owner = "oras-project";
11 hash = "sha256-oWDxrxCrBU0quSpRLXZ0w1COuImVj4FzAmv8574x76o=";
14 vendorHash = "sha256-51keQmj1eGT3rJysnfTWIl8xoHfz3NPL/qXegc3wwNc=";
16 nativeBuildInputs = [ installShellFiles ];
18 excludedPackages = [ "./test/e2e" ];
23 "-X oras.land/oras/internal/version.Version=${version}"
24 "-X oras.land/oras/internal/version.BuildMetadata="
25 "-X oras.land/oras/internal/version.GitTreeState=clean"
29 installShellCompletion --cmd oras \
30 --bash <($out/bin/oras completion bash) \
31 --fish <($out/bin/oras completion fish) \
32 --zsh <($out/bin/oras completion zsh)
35 doInstallCheck = true;
36 installCheckPhase = ''
37 runHook preInstallCheck
40 $out/bin/oras version | grep "${version}"
42 runHook postInstallCheck
45 passthru.tests.version = testers.testVersion {
47 command = "oras version";
51 homepage = "https://oras.land/";
52 changelog = "https://github.com/oras-project/oras/releases/tag/v${version}";
53 description = "The ORAS project provides a way to push and pull OCI Artifacts to and from OCI Registries";
54 license = licenses.asl20;
55 maintainers = with maintainers; [ jk developer-guy ];