nixpkgs/pkgs/development/tools/rain/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

39 lines
844 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, testers
, rain
}:
buildGoModule rec {
pname = "rain";
version = "1.8.1";
src = fetchFromGitHub {
owner = "aws-cloudformation";
repo = pname;
rev = "v${version}";
sha256 = "sha256-II+SJkdlmtPuVEK+s9VLAwoe7+jYYXA+6uxAXD5NZHU=";
};
vendorHash = "sha256-Ea83gPSq7lReS2KXejY9JlDDEncqS1ouVyIEKbn+VAw=";
subPackages = [ "cmd/rain" ];
ldflags = [ "-s" "-w" ];
passthru.tests.version = testers.testVersion {
package = rain;
command = "rain --version";
version = "v${version}";
};
meta = with lib; {
description = "A development workflow tool for working with AWS CloudFormation";
mainProgram = "rain";
homepage = "https://github.com/aws-cloudformation/rain";
license = licenses.asl20;
maintainers = with maintainers; [ jiegec ];
};
}