From 517ce3aba91ea04f0d33eec3f87285cbce0d8eec Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 4 Dec 2022 17:53:33 +0100 Subject: [PATCH] metal-cli: add changelog to meta --- pkgs/development/tools/metal-cli/default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/metal-cli/default.nix b/pkgs/development/tools/metal-cli/default.nix index 88f7e4699269..9c254bb2c79a 100644 --- a/pkgs/development/tools/metal-cli/default.nix +++ b/pkgs/development/tools/metal-cli/default.nix @@ -1,4 +1,8 @@ -{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: +{ lib +, buildGoModule +, fetchFromGitHub +, installShellFiles +}: buildGoModule rec { pname = "metal-cli"; @@ -8,17 +12,20 @@ buildGoModule rec { owner = "equinix"; repo = pname; rev = "v${version}"; - sha256 = "sha256-oPMojw6CGncBJ8PZOTrzvQu2gRs1cw1Jwi38eOZggI8="; + hash = "sha256-oPMojw6CGncBJ8PZOTrzvQu2gRs1cw1Jwi38eOZggI8="; }; - vendorSha256 = "sha256-drsNZXLNUWICLI8D+IvJE4X8GmWrP9U3dmpf9HnKCWw="; + vendorHash = "sha256-drsNZXLNUWICLI8D+IvJE4X8GmWrP9U3dmpf9HnKCWw="; ldflags = [ - "-s" "-w" + "-s" + "-w" "-X github.com/equinix/metal-cli/cmd.Version=${version}" ]; - nativeBuildInputs = [ installShellFiles ]; + nativeBuildInputs = [ + installShellFiles + ]; postInstall = '' installShellCompletion --cmd metal \ @@ -30,6 +37,7 @@ buildGoModule rec { doCheck = false; doInstallCheck = true; + installCheckPhase = '' $out/bin/metal --version | grep ${version} ''; @@ -37,6 +45,7 @@ buildGoModule rec { meta = with lib; { description = "Official Equinix Metal CLI"; homepage = "https://github.com/equinix/metal-cli/"; + changelog = "https://github.com/equinix/metal-cli/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ Br1ght0ne nshalman ]; mainProgram = "metal";