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 000000000000..40df9e974e4d --- /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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 660118f9cb7b..cba1b9ce8fad 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -261,6 +261,8 @@ in protoc-gen-twirp = callPackage ../development/tools/protoc-gen-twirp { }; + protoc-gen-twirp_php = callPackage ../development/tools/protoc-gen-twirp_php { }; + ptags = callPackage ../development/tools/misc/ptags { }; ptouch-print = callPackage ../misc/ptouch-print { };