commit 2742690d74f54f07df664cf8e01edbf03bdaf64e
parent a5f278ca6a3189d7102719dd2bbb2c04f8ca3cb3
Author: Vincent Demeester <vincent@sbr.pm>
Date: Mon, 17 Sep 2018 11:33:16 +0200
Package protobuild (and use it in dev.go)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
5 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/dev.go.nix b/dev.go.nix
@@ -28,5 +28,6 @@
dep
# misc
protobuf
+ protobuild
];
}
diff --git a/overlays/sbr.nix b/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;
};
diff --git a/pkgs/default.nix b/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;
};
diff --git a/pkgs/protobuild/default.nix b/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;
+ };
+}
diff --git a/pkgs/protobuild/deps.nix b/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";
+ };
+ }
+]