From 2432cb68e4a80017a3430a60f5e4b212b5ae2385 Mon Sep 17 00:00:00 2001 From: hauskens Date: Wed, 27 Nov 2024 17:23:15 +0100 Subject: [PATCH] acr-cli: init at 0.14 --- pkgs/by-name/ac/acr-cli/package.nix | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 pkgs/by-name/ac/acr-cli/package.nix diff --git a/pkgs/by-name/ac/acr-cli/package.nix b/pkgs/by-name/ac/acr-cli/package.nix new file mode 100644 index 0000000000000..51df14afc5a93 --- /dev/null +++ b/pkgs/by-name/ac/acr-cli/package.nix @@ -0,0 +1,45 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + testers, + nix-update-script, + acr-cli, +}: +buildGoModule rec { + pname = "acr-cli"; + version = "0.14"; + + src = fetchFromGitHub { + owner = "Azure"; + repo = "acr-cli"; + rev = "refs/tags/v${version}"; + hash = "sha256-h4vRtxAu/ggEu5HuzaiEoLslOyAXP1rMI1/ua9YARug="; + }; + + vendorHash = null; + + ldflags = [ + "-s" + "-w" + "-X=github.com/Azure/acr-cli/version.Version=${version}" + "-X=github.com/Azure/acr-cli/version.Revision=${src.rev}" + ]; + + executable = [ "acr" ]; + + passthru.tests.version = testers.testVersion { + package = acr-cli; + command = "acr version"; + }; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Command Line Tool for interacting with Azure Container Registry Images"; + homepage = "https://github.com/Azure/acr-cli"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ hausken ]; + mainProgram = "acr-cli"; + }; +}