1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-30 09:31:01 +00:00
nixpkgs/pkgs/tools/security/vault/default.nix
Ryan Mulligan 732be7d572 vault: 0.9.4 -> 0.9.5
Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done:

- built on NixOS
- ran `/nix/store/8w89f27dfrsksnm1xs4pyplbvi6y3sfa-vault-0.9.5/bin/vault -h` got 0 exit code
- ran `/nix/store/8w89f27dfrsksnm1xs4pyplbvi6y3sfa-vault-0.9.5/bin/vault --help` got 0 exit code
- ran `/nix/store/8w89f27dfrsksnm1xs4pyplbvi6y3sfa-vault-0.9.5/bin/vault -v` and found version 0.9.5
- ran `/nix/store/8w89f27dfrsksnm1xs4pyplbvi6y3sfa-vault-0.9.5/bin/vault --version` and found version 0.9.5
- ran `/nix/store/8w89f27dfrsksnm1xs4pyplbvi6y3sfa-vault-0.9.5/bin/vault version` and found version 0.9.5
- found 0.9.5 with grep in /nix/store/8w89f27dfrsksnm1xs4pyplbvi6y3sfa-vault-0.9.5
2018-03-15 11:52:45 -07:00

53 lines
1.5 KiB
Nix

{ stdenv, fetchFromGitHub, go, gox, removeReferencesTo }:
let
vaultBashCompletions = fetchFromGitHub {
owner = "iljaweis";
repo = "vault-bash-completion";
rev = "e2f59b64be1fa5430fa05c91b6274284de4ea77c";
sha256 = "10m75rp3hy71wlmnd88grmpjhqy0pwb9m8wm19l0f463xla54frd";
};
in stdenv.mkDerivation rec {
name = "vault-${version}";
version = "0.9.5";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "vault";
rev = "v${version}";
sha256 = "1ddki3bnp6yrajc0cxxjkbdlfp0xqx407nxvvv611lsnlbr2sz5g";
};
nativeBuildInputs = [ go gox removeReferencesTo ];
buildPhase = ''
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 src/github.com/hashicorp
ln -s $(pwd) src/github.com/hashicorp/vault
mkdir -p .git/hooks
GOPATH=$(pwd) make
'';
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} '{}' +
cp ${vaultBashCompletions}/vault-bash-completion.sh $out/share/bash-completion/completions/vault
'';
meta = with stdenv.lib; {
homepage = https://www.vaultproject.io;
description = "A tool for managing secrets";
platforms = platforms.linux ++ platforms.darwin;
license = licenses.mpl20;
maintainers = with maintainers; [ rushmorem offline pradeepchhetri ];
};
}