Commit 2742690d74f5

Vincent Demeester <vincent@sbr.pm>
2018-09-17 11:33:16
Package protobuild (and use it in dev.go)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent a5f278c
Changed files (5)
overlays/sbr.nix
@@ -6,6 +6,9 @@ self: super:
   dobi = import ../pkgs/dobi {
     inherit (self) stdenv lib buildGoPackage fetchFromGitHub;
   };
+  protobuild = import ../pkgs/protobuild {
+    inherit (self) stdenv lib buildGoPackage fetchgit;
+  };
   scripts = import ../pkgs/scripts {
     inherit (self) stdenv;
   };
pkgs/protobuild/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, lib, buildGoPackage, fetchgit }:
+
+buildGoPackage rec {
+  name = "protobuild-unstable-${version}";
+  version = "2018-03-27";
+  rev = "e76179fda745e7e601c8c78943191913e3e8a009";
+
+  goPackagePath = "github.com/stevvooe/protobuild";
+
+  src = fetchgit {
+    inherit rev;
+    url = "https://github.com/stevvooe/protobuild";
+    sha256 = "0p8smvf2984kjx3m4qx5ap3005m1df40ynww8rjcrq7gzc3vn61n";
+  };
+
+  goDeps = ./deps.nix;
+
+  meta = {
+    description = "Build protobufs in Go, easily";
+    homepage = https://github.com/stevvooe/protobuild;
+    license = lib.licenses.asl20;
+  };
+}
pkgs/protobuild/deps.nix
@@ -0,0 +1,30 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
+[
+  {
+    goPackagePath = "github.com/BurntSushi/toml";
+    fetch = {
+      type = "git";
+      url = "https://github.com/BurntSushi/toml";
+      rev = "3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005";
+      sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6";
+    };
+  }
+  {
+    goPackagePath = "github.com/gogo/protobuf";
+    fetch = {
+      type = "git";
+      url = "https://github.com/gogo/protobuf";
+      rev = "4aa4cc277ae58d2fab6cfe51dd17df5dceaf457d";
+      sha256 = "009z6rpivyakgsxs0zkm94c9i7l65hcw2ljvah94wq3y6v6j47gs";
+    };
+  }
+  {
+    goPackagePath = "github.com/golang/protobuf";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/protobuf";
+      rev = "0f2620f554cf5c8e281a2eb655a035f5a0f6dc90";
+      sha256 = "0lxngq1a8cnsy6dlr6gi8pjv3fir2wiw76qh075pa9g02h7ywhv3";
+    };
+  }
+]
pkgs/default.nix
@@ -9,6 +9,9 @@ in rec {
   dobi = import ./dobi {
     inherit (pkgs) stdenv lib fetchFromGitHub buildGoPackage;
   };
+  protobuild = import ./protobuild {
+    inherit (pkgs) stdenv lib buildGoPackage fetchgit;
+  };
   scripts = import ./scripts {
     inherit (pkgs) stdenv;
   };
dev.go.nix
@@ -28,5 +28,6 @@
     dep
     # misc
     protobuf
+    protobuild
   ];
 }