From 0e752c942744ed5bab59565ba7da499889a7ef25 Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Tue, 3 Mar 2015 00:56:10 -0500 Subject: [PATCH] Add preliminary hologram --- pkgs/top-level/go-packages.nix | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index 30e93dc2e369..94ef8a4ae077 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -1,7 +1,7 @@ /* This file defines the composition for Go packages. */ { overrides, stdenv, go, buildGoPackage, git, pkgconfig, libusb -, fetchgit, fetchhg, fetchurl, fetchFromGitHub, fetchbzr }: +, fetchgit, fetchhg, fetchurl, fetchFromGitHub, fetchbzr, pkgs }: let self = _self // overrides; _self = with self; { @@ -501,6 +501,31 @@ let self = _self // overrides; _self = with self; { }; }; + hologram = buildGoPackage rec { + rev = "6e81a11091f59a9392e424d8f1c42b4b813c4bff"; + name = "hologram-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/AdRoll/hologram"; + src = fetchFromGitHub { + inherit rev; + owner = "copumpkin"; + repo = "hologram"; + sha256 = "1rpnc8sv9mwm9r9yfh8h2zxczznmvlhasrz55bcifmk4sym4ywq7"; + }; + preBuild = '' + cd "go/src/$goPackagePath" + # Work around `go install` assuming containing directory is the executable name we want + for i in */bin; do + mv "$i" "$(dirname "$i")/$(dirname "$i")" + done + + # Generate protobuf definitions and static assets + make protocol/hologram.pb.go + make transport/remote/bindata.go + ''; + + buildInputs = [ pkgs.protobuf crypto protobuf goamz rgbterm go-bindata go-homedir ldap g2s gox ]; + }; + influxdb-go = buildGoPackage rec { rev = "63c9a5f67dcb633d05164bf8442160c9e2e402f7"; name = "influxdb-go-${stdenv.lib.strings.substring 0 7 rev}";