commit 258f56bfeddca05292298b02507909a5ef776958
parent 2742690d74f54f07df664cf8e01edbf03bdaf64e
Author: Vincent Demeester <vincent@sbr.pm>
Date: Mon, 17 Sep 2018 11:52:09 +0200
pkgs: experiment packaging gogo-protobuf commands…
… I think I may need the proto available somewhere too…
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
4 files changed, 81 insertions(+), 0 deletions(-)
diff --git a/overlays/sbr.nix b/overlays/sbr.nix
@@ -9,6 +9,9 @@ self: super:
protobuild = import ../pkgs/protobuild {
inherit (self) stdenv lib buildGoPackage fetchgit;
};
+ gogo-protobuf = import ./gogo-protobuf {
+ inherit (self) stdenv lib buildGoPackage fetchgit;
+ };
scripts = import ../pkgs/scripts {
inherit (self) stdenv;
};
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -12,6 +12,9 @@ in rec {
protobuild = import ./protobuild {
inherit (pkgs) stdenv lib buildGoPackage fetchgit;
};
+ gogo-protobuf = import ./gogo-protobuf {
+ inherit (pkgs) stdenv lib buildGoPackage fetchgit;
+ };
scripts = import ./scripts {
inherit (pkgs) stdenv;
};
diff --git a/pkgs/gogo-protobuf/default.nix b/pkgs/gogo-protobuf/default.nix
@@ -0,0 +1,27 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
+{ stdenv, lib, buildGoPackage, fetchgit }:
+
+buildGoPackage rec {
+ name = "gogo-protobuf-unstable-${version}";
+ version = "2018-09-14";
+ rev = "e14cafb6a2c249986e51c4b65c3206bf18578715";
+
+ goPackagePath = "github.com/gogo/protobuf";
+
+ src = fetchgit {
+ inherit rev;
+ url = "https://github.com/gogo/protobuf";
+ sha256 = "1q00r1s462xsmw8qc6incvp6m3f39jibjj8syw23jvwiy3vp75a8";
+ };
+
+ goDeps = ./deps.nix;
+ subPackages = [
+ "protoc-gen-combo" "protoc-gen-gofast" "protoc-gen-gogo"
+ "protoc-gen-gogofast" "protoc-gen-gogofaster" "protoc-gen-gogoslick"
+ "protoc-gen-gogotypes" "protoc-gen-gostring" "protoc-min-version"
+ ];
+
+ # TODO: add metadata https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes
+ meta = {
+ };
+}
diff --git a/pkgs/gogo-protobuf/deps.nix b/pkgs/gogo-protobuf/deps.nix
@@ -0,0 +1,48 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
+[
+ {
+ goPackagePath = "google.golang.org/grpc";
+ fetch = {
+ type = "git";
+ url = "https://github.com/grpc/grpc-go";
+ rev = "f92cdcd7dcdc69e81b2d7b338479a19a8723cfa3";
+ sha256 = "1li8rn2s4f8qc77npamlm2ijin44scb8vvd8c4cr0l7za2m89jfn";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/text";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/text";
+ rev = "1cbadb444a806fd9430d14ad08967ed91da4fa0a";
+ sha256 = "0ih9ysagh4ylj08393497sscf3yziybc6acg4mrh0wa7mld75j56";
+ };
+ }
+ {
+ goPackagePath = "github.com/golang/protobuf";
+ fetch = {
+ type = "git";
+ url = "https://github.com/golang/protobuf";
+ rev = "2bba0603135d7d7f5cb73b2125beeda19c09f4ef";
+ sha256 = "1xy0bj66qks2xlzxzlfma16w7m8g6rrwawmlhlv68bcw2k5hvvib";
+ };
+ }
+ {
+ goPackagePath = "google.golang.org/genproto";
+ fetch = {
+ type = "git";
+ url = "https://github.com/google/go-genproto";
+ rev = "1e559d0a00eef8a9a43151db4665280bd8dd5886";
+ sha256 = "1dfm8zd9mif1aswks79wgyi7n818s5brbdnnrrlg79whfhaf20hd";
+ };
+ }
+ {
+ goPackagePath = "golang.org/x/net";
+ fetch = {
+ type = "git";
+ url = "https://go.googlesource.com/net";
+ rev = "aaf60122140d3fcf75376d319f0554393160eb50";
+ sha256 = "03i6ij7jcf5mp9dc8ps8b63g1k843z7c823qyzn5a276gpxvxlvv";
+ };
+ }
+]