From 214c291f556430763dc0621a6226917e13fcc1bd Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Thu, 21 Jul 2022 23:29:21 +0800 Subject: [PATCH] rain: init at 1.2.0 It cannot build with Go 1.18, so Go 1.17 is used. --- pkgs/development/tools/rain/default.nix | 38 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/tools/rain/default.nix diff --git a/pkgs/development/tools/rain/default.nix b/pkgs/development/tools/rain/default.nix new file mode 100644 index 000000000000..07db283bff70 --- /dev/null +++ b/pkgs/development/tools/rain/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, testers +, rain +}: + +buildGoModule rec { + pname = "rain"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "aws-cloudformation"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-6YKZy6sdy1Yi2cDaLMA54GBTZ9uPhYi5Cq5QqCGbD5k="; + }; + + vendorSha256 = "sha256-e3R8+xarofbx3Ky6JIfDbysTQETCUaQj/QmzAiU7fZk="; + + 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"; + homepage = "https://github.com/aws-cloudformation/rain"; + license = licenses.asl20; + maintainers = with maintainers; [ jiegec ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 018e6dfc9084..4020f0ca89e0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10155,6 +10155,10 @@ with pkgs; radvd = callPackage ../tools/networking/radvd { }; + rain = callPackage ../development/tools/rain { + buildGoModule = buildGo117Module; + }; + rainbowstream = with python3.pkgs; toPythonApplication rainbowstream; rambox = callPackage ../applications/networking/instant-messengers/rambox { };