diff options
author | Jaka Hudoklin <offlinehacker@users.noreply.github.com> | 2019-08-29 07:07:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-29 07:07:09 +0000 |
commit | 8d1510abfb592339e13ce8f6db6f29c1f8b72924 (patch) | |
tree | 98e882ecc4d8ee32677910352cd804be215e4a87 /pkgs/tools/security | |
parent | 3f632253094adbf884e7e33a82f7289555bcb734 (diff) | |
parent | 4b99f9ba0bac82b2d3391ad115d4941b483986f5 (diff) |
Merge pull request #67606 from endocrimes/r-vault-1.2.2
vault: 1.0.2 -> 1.2.2
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r-- | pkgs/tools/security/vault/default.nix | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/pkgs/tools/security/vault/default.nix b/pkgs/tools/security/vault/default.nix index 3f366a583204..dcded0652763 100644 --- a/pkgs/tools/security/vault/default.nix +++ b/pkgs/tools/security/vault/default.nix @@ -1,36 +1,25 @@ -{ stdenv, fetchFromGitHub, go, gox, removeReferencesTo }: +{ stdenv, fetchFromGitHub, buildGoModule }: -stdenv.mkDerivation rec { +buildGoModule rec { name = "vault-${version}"; - version = "1.1.3"; + version = "1.2.2"; src = fetchFromGitHub { owner = "hashicorp"; repo = "vault"; rev = "v${version}"; - sha256 = "0dylwvs95crvn1p7pbyzib979rxzp4ivzvi5k4f5ivp4ygnp597s"; + sha256 = "1xljm7xmb4ldg3wx8s9kw1spffg4ywk4r1jqfa743czd2xxmqavl"; }; - nativeBuildInputs = [ go gox removeReferencesTo ]; + modSha256 = "13pr3piv6hrsc562qagpn1h5wckiziyfqraj13172hdglz3n2i7q"; - preBuild = '' - patchShebangs ./ - substituteInPlace scripts/build.sh --replace 'git rev-parse HEAD' 'echo ${src.rev}' - sed -i s/'^GIT_DIRTY=.*'/'GIT_DIRTY="+NixOS"'/ scripts/build.sh - - mkdir -p .git/hooks src/github.com/hashicorp - ln -s $(pwd) src/github.com/hashicorp/vault - - export GOPATH=$(pwd) - export GOCACHE="$TMPDIR/go-cache" - ''; - - installPhase = '' - mkdir -p $out/bin $out/share/bash-completion/completions - - cp pkg/*/* $out/bin/ - find $out/bin -type f -exec remove-references-to -t ${go} '{}' + + buildFlagsArray = [ + "-tags='vault'" + "-ldflags=\"-X github.com/hashicorp/vault/sdk/version.GitCommit='v${version}'\"" + ]; + postInstall = '' + mkdir -p $out/share/bash-completion/completions echo "complete -C $out/bin/vault vault" > $out/share/bash-completion/completions/vault ''; |