3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/security/vault/vault-bin.nix

55 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, unzip }:
let
2019-11-25 16:23:59 +00:00
version = "1.3.0";
sources = let
base = "https://releases.hashicorp.com/vault/${version}";
in {
2019-08-13 22:52:01 +01:00
x86_64-linux = fetchurl {
url = "${base}/vault_${version}_linux_amd64.zip";
2019-11-25 16:23:59 +00:00
sha256 = "1crfj4gd1qwwa2xidd0pjffv0n6hf5hbhv6568m6zc1ig0qqm6yq";
};
2019-08-13 22:52:01 +01:00
i686-linux = fetchurl {
url = "${base}/vault_${version}_linux_386.zip";
2019-11-25 16:23:59 +00:00
sha256 = "0pyf0kyvxpmx3fwfvin1r0x30r9byx9lyi81894q06xrhiwbqc0l";
};
2019-08-13 22:52:01 +01:00
x86_64-darwin = fetchurl {
url = "${base}/vault_${version}_darwin_amd64.zip";
2019-11-25 16:23:59 +00:00
sha256 = "113vnpz9n6y7z2k9jqpfpxqxqbrmd9bhny79yaxqzkfdqw8vyv3g";
};
2019-08-13 22:52:01 +01:00
i686-darwin = fetchurl {
url = "${base}/vault_${version}_darwin_386.zip";
2019-11-25 16:23:59 +00:00
sha256 = "0d191qai0bpl7cyivca26wqgycsj2dz08809z147d1vnrz321v6w";
};
2019-08-13 22:52:01 +01:00
aarch64-linux = fetchurl {
url = "${base}/vault_${version}_linux_arm64.zip";
2019-11-25 16:23:59 +00:00
sha256 = "1bk5y3knc42mh07gnnn6p109qz908014620h1s0348wp4qfdy49w";
};
};
in stdenv.mkDerivation {
2019-08-13 22:52:01 +01:00
pname = "vault-bin";
inherit version;
2019-08-13 22:52:01 +01:00
src = sources.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}");
nativeBuildInputs = [ unzip ];
sourceRoot = ".";
installPhase = ''
mkdir -p $out/bin $out/share/bash-completion/completions
mv vault $out/bin
echo "complete -C $out/bin/vault vault" > $out/share/bash-completion/completions/vault
'';
meta = with stdenv.lib; {
homepage = https://www.vaultproject.io;
description = "A tool for managing secrets, this binary includes the UI";
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" "i686-darwin" ];
license = licenses.mpl20;
2019-11-25 16:23:59 +00:00
maintainers = with maintainers; [ offline psyanticy mkaito ];
};
}