about summary refs log tree commit diff
path: root/pkgs/development/tools/protoc-gen-twirp_php
diff options
context:
space:
mode:
authorJohannes Schleifenbaum <johannes@js-webcoding.de>2021-03-29 16:28:07 +0200
committerJohannes Schleifenbaum <johannes@js-webcoding.de>2021-03-30 11:12:13 +0200
commitd8a87b7a3e4c15ec9083318f4d2bfa1ee8c16c3f (patch)
treecabbd14b07582b74f607485178d08fec3c51ec7c /pkgs/development/tools/protoc-gen-twirp_php
parent180781246fe15de3eb66174041f93e234d1aec2e (diff)
protoc-gen-twirp_php: init at 0.6.0
Diffstat (limited to 'pkgs/development/tools/protoc-gen-twirp_php')
-rw-r--r--pkgs/development/tools/protoc-gen-twirp_php/default.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/development/tools/protoc-gen-twirp_php/default.nix b/pkgs/development/tools/protoc-gen-twirp_php/default.nix
new file mode 100644
index 0000000000000..40df9e974e4d3
--- /dev/null
+++ b/pkgs/development/tools/protoc-gen-twirp_php/default.nix
@@ -0,0 +1,28 @@
+{ lib, buildGoModule, fetchgit }:
+
+buildGoModule rec {
+  pname = "protoc-gen-twirp_php";
+  version = "0.6.0";
+
+  # fetchFromGitHub currently not possible, because go.mod and go.sum are export-ignored
+  src = fetchgit {
+    url = "https://github.com/twirphp/twirp.git";
+    rev = "v${version}";
+    sha256 = "sha256-WnvCdAJIMA4A+f7H61qcVbKNn23bNVOC15vMCEKc+CI=";
+  };
+
+  vendorSha256 = "sha256-LIMxrWXlK7+JIRmtukdXPqfw8H991FCAOuyEf7ZLSTs=";
+
+  subPackages = [ "protoc-gen-twirp_php" ];
+
+  preBuild = ''
+    go generate ./...
+  '';
+
+  meta = with lib; {
+    description = "PHP port of Twitch's Twirp RPC framework";
+    homepage = "https://github.com/twirphp/twirp";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jojosch ];
+  };
+}