diff --git a/pkgs/development/tools/protoc-gen-go/default.nix b/pkgs/development/tools/protoc-gen-go/default.nix new file mode 100644 index 00000000000..9f94e3c78f3 --- /dev/null +++ b/pkgs/development/tools/protoc-gen-go/default.nix @@ -0,0 +1,24 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "protoc-gen-go"; + version = "1.26.0"; + + src = fetchFromGitHub { + owner = "protocolbuffers"; + repo = "protobuf-go"; + rev = "v${version}"; + sha256 = "sha256-n2LHI8DXQFFWhTPOFCegBgwi/0tFvRE226AZfRW8Bnc="; + }; + + vendorSha256 = "sha256-yb8l4ooZwqfvenlxDRg95rqiL+hmsn0weS/dPv/oD2Y="; + + subPackages = [ "cmd/protoc-gen-go" ]; + + meta = with lib; { + description = "Go support for Google's protocol buffers"; + homepage = "https://google.golang.org/protobuf"; + license = licenses.bsd3; + maintainers = with maintainers; [ jojosch ]; + }; +} diff --git a/pkgs/development/tools/protoc-gen-twirp/default.nix b/pkgs/development/tools/protoc-gen-twirp/default.nix new file mode 100644 index 00000000000..ae92a105503 --- /dev/null +++ b/pkgs/development/tools/protoc-gen-twirp/default.nix @@ -0,0 +1,27 @@ +{ lib, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + pname = "protoc-gen-twirp"; + version = "7.1.1"; + + src = fetchFromGitHub { + owner = "twitchtv"; + repo = "twirp"; + rev = "v${version}"; + sha256 = "sha256-GN7akAp0zzS8wVhgXlT1ceFUFKH4Sz74XQ8ofIE8T/k="; + }; + + goPackagePath = "github.com/twitchtv/twirp"; + + subPackages = [ + "protoc-gen-twirp" + "protoc-gen-twirp_python" + ]; + + meta = with lib; { + description = "A simple RPC framework with protobuf service definitions"; + homepage = "https://github.com/twitchtv/twirp"; + license = licenses.asl20; + maintainers = with maintainers; [ jojosch ]; + }; +} 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 00000000000..40df9e974e4 --- /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/development/tools/protoc-gen-twirp_swagger/default.nix b/pkgs/development/tools/protoc-gen-twirp_swagger/default.nix new file mode 100644 index 00000000000..3348759c011 --- /dev/null +++ b/pkgs/development/tools/protoc-gen-twirp_swagger/default.nix @@ -0,0 +1,24 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule { + pname = "protoc-gen-twirp_swagger"; + version = "unstable-2021-03-29"; + + src = fetchFromGitHub { + owner = "elliots"; + repo = "protoc-gen-twirp_swagger"; + rev = "f21ef47d69e37c1602a7fb26146de05c092d30b6"; + sha256 = "sha256-uHU15NbHK7SYgNS3VK21H/OqDo/JyyTZdXw3i9lsgLY="; + }; + + vendorSha256 = "sha256-g0+9l83Fc0XPzsZAKjLBrjD+tv2+Fot57hcilqAhOZk="; + + subPackages = [ "." ]; + + meta = with lib; { + description = "Swagger generator for twirp"; + homepage = "https://github.com/elliots/protoc-gen-twirp_swagger"; + license = licenses.bsd3; + maintainers = with maintainers; [ jojosch ]; + }; +} diff --git a/pkgs/development/tools/protoc-gen-twirp_typescript/default.nix b/pkgs/development/tools/protoc-gen-twirp_typescript/default.nix new file mode 100644 index 00000000000..2aabe3bcce6 --- /dev/null +++ b/pkgs/development/tools/protoc-gen-twirp_typescript/default.nix @@ -0,0 +1,24 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule { + pname = "protoc-gen-twirp_typescript"; + version = "unstable-2021-03-29"; + + src = fetchFromGitHub { + owner = "larrymyers"; + repo = "protoc-gen-twirp_typescript"; + rev = "97fd63e543beb2d9f6a90ff894981affe0f2faf1"; + sha256 = "sha256-LfF/n96LwRX8aoPHzCRI/QbDmZR9yMhE5yGhFAqa8nA="; + }; + + vendorSha256 = "sha256-WISWuq1neVX4xQkoamc6FznZahOQHwgkYmERJF40OFQ="; + + subPackages = [ "." ]; + + meta = with lib; { + description = "Protobuf Plugin for Generating a Twirp Typescript Client"; + homepage = "https://github.com/larrymyers/protoc-gen-twirp_typescript"; + license = licenses.mit; + maintainers = with maintainers; [ jojosch ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4f8d6503ec2..41ec302eb68 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -259,6 +259,16 @@ in protoc-gen-doc = callPackage ../development/tools/protoc-gen-doc {}; + protoc-gen-go = callPackage ../development/tools/protoc-gen-go { }; + + protoc-gen-twirp = callPackage ../development/tools/protoc-gen-twirp { }; + + protoc-gen-twirp_php = callPackage ../development/tools/protoc-gen-twirp_php { }; + + protoc-gen-twirp_swagger = callPackage ../development/tools/protoc-gen-twirp_swagger { }; + + protoc-gen-twirp_typescript = callPackage ../development/tools/protoc-gen-twirp_typescript { }; + ptags = callPackage ../development/tools/misc/ptags { }; ptouch-print = callPackage ../misc/ptouch-print { };