aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/servers/consul/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/consul/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/consul/default.nix24
1 files changed, 17 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/servers/consul/default.nix b/nixpkgs/pkgs/servers/consul/default.nix
index 8703e76cb71..a702626e1c1 100644
--- a/nixpkgs/pkgs/servers/consul/default.nix
+++ b/nixpkgs/pkgs/servers/consul/default.nix
@@ -1,12 +1,10 @@
-{ stdenv, buildGoPackage, fetchFromGitHub }:
+{ stdenv, buildGoModule, fetchFromGitHub, nixosTests }:
-buildGoPackage rec {
+buildGoModule rec {
pname = "consul";
- version = "1.7.2";
+ version = "1.7.3";
rev = "v${version}";
- goPackagePath = "github.com/hashicorp/consul";
-
# Note: Currently only release tags are supported, because they have the Consul UI
# vendored. See
# https://github.com/NixOS/nixpkgs/pull/48714#issuecomment-433454834
@@ -19,11 +17,23 @@ buildGoPackage rec {
owner = "hashicorp";
repo = pname;
inherit rev;
- sha256 = "1q587d8aqfkwg4fymr56fnf038vkxbdqz5yilz96dzny27dhspj4";
+ sha256 = "05p893mfdrlf5fy9ywwnqb7blw1ffidgviyyh6a3bp82wk49f8ph";
};
+ passthru.tests.consul = nixosTests.consul;
+
+ # This corresponds to paths with package main - normally unneeded but consul
+ # has a split module structure in one repo
+ subPackages = ["." "connect/certgen"];
+
+ vendorSha256 = "1lcpldkssbq6qkkq22bvx9jb5klcxr8422mpx47wz39pry8vy9b6";
+ deleteVendor = true;
+
preBuild = ''
- buildFlagsArray+=("-ldflags" "-X github.com/hashicorp/consul/version.GitDescribe=v${version} -X github.com/hashicorp/consul/version.Version=${version} -X github.com/hashicorp/consul/version.VersionPrerelease=")
+ buildFlagsArray+=("-ldflags"
+ "-X github.com/hashicorp/consul/version.GitDescribe=v${version}
+ -X github.com/hashicorp/consul/version.Version=${version}
+ -X github.com/hashicorp/consul/version.VersionPrerelease=")
'';
meta = with stdenv.lib; {