mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
consul-template: Move to go-packages
This commit is contained in:
parent
414b3f2909
commit
f0d324c23a
@ -1,34 +0,0 @@
|
||||
{ stdenv, lib, go, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "consul-template-${version}";
|
||||
version = "0.7.0";
|
||||
|
||||
src = import ./deps.nix {
|
||||
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
|
||||
buildPhase = ''
|
||||
GOPATH=$src go build -v -o consul-template github.com/hashicorp/consul-template
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
# Fix references to go-deps in the binary
|
||||
hash=$(echo $src | sed 's,.*/\([^/-]*\).*,\1,g')
|
||||
xs=$(printf 'x%.0s' $(seq 2 $(echo $hash | wc -c)))
|
||||
sed -i "s,$hash,$xs,g" consul-template
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp consul-template $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Generic template rendering and notifications with Consul";
|
||||
homepage = https://github.com/hashicorp/consul-template;
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ puffnfresh wkennington ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@ -764,7 +764,7 @@ let
|
||||
|
||||
consul-alerts = callPackage ../servers/consul/alerts.nix { };
|
||||
|
||||
consul-template = callPackage ../servers/consul/template.nix { };
|
||||
consul-template = goPackages.consul-template;
|
||||
|
||||
corosync = callPackage ../servers/corosync { };
|
||||
|
||||
|
@ -359,6 +359,27 @@ let
|
||||
buildInputs = [ raft raft-boltdb raft-mdb ];
|
||||
};
|
||||
|
||||
consul-template = buildGoPackage rec {
|
||||
rev = "v0.9.0";
|
||||
name = "consul-template-${rev}";
|
||||
goPackagePath = "github.com/hashicorp/consul-template";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit rev;
|
||||
owner = "hashicorp";
|
||||
repo = "consul-template";
|
||||
sha256 = "1k64rjskzn7cxn7rxab978847jq8gr4zj4cnzgznhn44nzasgymj";
|
||||
};
|
||||
|
||||
# We just want the consul api not all of consul and vault
|
||||
extraSrcs = [
|
||||
{ inherit (consul) src goPackagePath; }
|
||||
{ inherit (vault) src goPackagePath; }
|
||||
];
|
||||
|
||||
buildInputs = [ go-multierror go-syslog hcl logutils mapstructure ];
|
||||
};
|
||||
|
||||
dbus = buildGoPackage rec {
|
||||
rev = "88765d85c0fdadcd98a54e30694fa4e4f5b51133";
|
||||
name = "dbus-${stdenv.lib.strings.substring 0 7 rev}";
|
||||
|
Loading…
Reference in New Issue
Block a user