python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / tools / oras / default.nix
blobb0adcadd84403b9ad89397597984928d3e6f7b13
1 { lib, stdenv, buildGoModule, fetchFromGitHub }:
3 buildGoModule rec {
4   pname = "oras";
5   version = "0.15.1";
7   src = fetchFromGitHub {
8     owner = "oras-project";
9     repo = "oras";
10     rev = "v${version}";
11     sha256 = "sha256-8QmMC4eB7WNxfEsVRUzv/gb7QmNBvcgDEENa1XxpCug=";
12   };
13   vendorSha256 = "sha256-THqrGnJnNDL6BJpRxeNLPjWB+SEUMUhiVOcJZDTM6n8=";
15   ldflags = [
16     "-s"
17     "-w"
18     "-X github.com/oras-project/oras/internal/version.Version=${version}"
19     "-X github.com/oras-project/oras/internal/version.BuildMetadata="
20     "-X github.com/oras-project/oras/internal/version.GitTreeState=clean"
21   ];
23   doInstallCheck = true;
24   installCheckPhase = ''
25     runHook preInstallCheck
27     $out/bin/oras --help
28     $out/bin/oras version | grep "${version}"
30     runHook postInstallCheck
31   '';
33   meta = with lib; {
34     homepage = "https://oras.land/";
35     changelog = "https://github.com/oras-project/oras/releases/tag/v${version}";
36     description = "The ORAS project provides a way to push and pull OCI Artifacts to and from OCI Registries";
37     license = licenses.asl20;
38     maintainers = with maintainers; [ jk ];
39   };