From 7a699e8d5002e0d2e471bb649b5aa2daeee0ef6a Mon Sep 17 00:00:00 2001 From: Maxine Aubrey Date: Wed, 28 Jul 2021 20:57:42 +0200 Subject: [PATCH 1/2] vault: 1.7.3 -> 1.8.0 --- pkgs/tools/security/vault/default.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/security/vault/default.nix b/pkgs/tools/security/vault/default.nix index 66a6d5e63e85..d502cc779c24 100644 --- a/pkgs/tools/security/vault/default.nix +++ b/pkgs/tools/security/vault/default.nix @@ -1,27 +1,35 @@ -{ stdenv, lib, fetchFromGitHub, buildGoPackage, installShellFiles, nixosTests +{ stdenv, lib, fetchFromGitHub, buildGoModule, installShellFiles, nixosTests , makeWrapper , gawk , glibc }: -buildGoPackage rec { +buildGoModule rec { pname = "vault"; - version = "1.7.3"; + version = "1.8.0"; src = fetchFromGitHub { owner = "hashicorp"; repo = "vault"; rev = "v${version}"; - sha256 = "sha256-BO4xzZrX9eVETQWjBDBfP7TlD7sO+gLgbB330A11KAI="; + sha256 = "sha256-jyGymAplSe8vaSwbONtpRoAondxNBcRbFZ+YyOtr7qo="; }; - goPackagePath = "github.com/hashicorp/vault"; + vendorSha256 = "11mrdf7pwf8v7bb7wamv2yhixw4x06rd0qym942kk9bwif2balfp"; subPackages = [ "." ]; nativeBuildInputs = [ installShellFiles makeWrapper ]; - buildFlagsArray = [ "-tags=vault" "-ldflags=-s -w -X ${goPackagePath}/sdk/version.GitCommit=${src.rev}" ]; + preBuild = '' + buildFlagsArray+=( + "-tags=vault" + "-ldflags=\ + -s -w \ + -X github.com/hashicorp/vault/sdk/version.GitCommit=${src.rev} \ + -X github.com/hashicorp/vault/sdk/version.Version=${version} \ + -X github.com/hashicorp/vault/sdk/version.VersionPrerelease=") + ''; postInstall = '' echo "complete -C $out/bin/vault vault" > vault.bash From 3e97a1f670cb0326969ba54f8a7866286c2224c9 Mon Sep 17 00:00:00 2001 From: Maxine Aubrey Date: Wed, 28 Jul 2021 20:57:52 +0200 Subject: [PATCH 2/2] vault-bin: 1.7.3 -> 1.8.0 --- pkgs/tools/security/vault/default.nix | 17 ++++++++--------- pkgs/tools/security/vault/vault-bin.nix | 10 +++++----- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/pkgs/tools/security/vault/default.nix b/pkgs/tools/security/vault/default.nix index d502cc779c24..e5b8b370ff33 100644 --- a/pkgs/tools/security/vault/default.nix +++ b/pkgs/tools/security/vault/default.nix @@ -21,15 +21,14 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles makeWrapper ]; - preBuild = '' - buildFlagsArray+=( - "-tags=vault" - "-ldflags=\ - -s -w \ - -X github.com/hashicorp/vault/sdk/version.GitCommit=${src.rev} \ - -X github.com/hashicorp/vault/sdk/version.Version=${version} \ - -X github.com/hashicorp/vault/sdk/version.VersionPrerelease=") - ''; + buildFlagsArray = [ "-tags=vault" ]; + + ldflags = [ + "-s" "-w" + "-X github.com/hashicorp/vault/sdk/version.GitCommit=${src.rev}" + "-X github.com/hashicorp/vault/sdk/version.Version=${version}" + "-X github.com/hashicorp/vault/sdk/version.VersionPrerelease=" + ]; postInstall = '' echo "complete -C $out/bin/vault vault" > vault.bash diff --git a/pkgs/tools/security/vault/vault-bin.nix b/pkgs/tools/security/vault/vault-bin.nix index 68df6e557f61..89ee2f2f2793 100644 --- a/pkgs/tools/security/vault/vault-bin.nix +++ b/pkgs/tools/security/vault/vault-bin.nix @@ -1,26 +1,26 @@ { lib, stdenv, fetchurl, unzip, makeWrapper, gawk, glibc }: let - version = "1.7.3"; + version = "1.8.0"; sources = let base = "https://releases.hashicorp.com/vault/${version}"; in { x86_64-linux = fetchurl { url = "${base}/vault_${version}_linux_amd64.zip"; - sha256 = "sha256-hFMTKpO3VcCondSy8amb1K8G+BZ7gZF/EXCAg5Ax4D8="; + sha256 = "sha256-H+kPDE8xuu2lgENf4t+vCb+Tni+ChkB8K5ZEgIY3Jyo="; }; i686-linux = fetchurl { url = "${base}/vault_${version}_linux_386.zip"; - sha256 = "02wbbzffb2m7y3476l5qa5dhi0v30f3sfif0svqhhzh927kg4s5w"; + sha256 = "19c7d7yr5nm1xgrkh46pcgwwxa6iic6is06n343qaxcj0dfg43kn"; }; x86_64-darwin = fetchurl { url = "${base}/vault_${version}_darwin_amd64.zip"; - sha256 = "0sw56dhjbasdnlwg668swhyxrn5gy7h9gysdg96za4dhq3iimkrn"; + sha256 = "0zql0r6gmq0yqb1cbpjgwsg6cky9y43n5gsvijp6snhnp86bicdr"; }; aarch64-linux = fetchurl { url = "${base}/vault_${version}_linux_arm64.zip"; - sha256 = "0c2w0684adaqildwviajp6pi8vp76g4zwwgc1k2bb5mwv1h2y293"; + sha256 = "1ajkgkanq8ijcxbb5zbn9z25r0v7qcq13ivjqr0x7ql5bxm3xfmc"; }; };