git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #67606 from endocrimes/r-vault-1.2.2

vault: 1.0.2 -> 1.2.2

commit8d1510abfb592339e13ce8f6db6f29c1f8b72924 authorJaka Hudoklin <offlinehacker@users.noreply.github.com> dateThu 29 Aug 2019, 07:07 (7 years ago) parent3f632254b99f9b
2 files changed+12−23
nixos/modules/services/security/vault.nix+1−1 pkgs/tools/security/vault/default.nix+11−22
nixos/modules/services/security/vault.nix+1−1
@@ -70,7 +70,7 @@ in
7070 };
7171
7272 storageBackend = mkOption {
73− type = types.enum [ "inmem" "file" "consul" "zookeeper" "s3" "azure" "dynamodb" "etcd" "mssql" "mysql" "postgresql" "swift" "gcs" ];
73+ type = types.enum [ "inmem" "file" "consul" "zookeeper" "s3" "azure" "dynamodb" "etcd" "mssql" "mysql" "postgresql" "swift" "gcs" "raft" ];
7474 default = "inmem";
7575 description = "The name of the type of storage backend";
7676 };
pkgs/tools/security/vault/default.nix+11−22
@@ -1,36 +1,25 @@
1−{ stdenv, fetchFromGitHub, go, gox, removeReferencesTo }:
1+{ stdenv, fetchFromGitHub, buildGoModule }:
22
3−stdenv.mkDerivation rec {
3+buildGoModule rec {
44 name = "vault-${version}";
5− version = "1.1.3";
5+ version = "1.2.2";
66
77 src = fetchFromGitHub {
88 owner = "hashicorp";
99 repo = "vault";
1010 rev = "v${version}";
11− sha256 = "0dylwvs95crvn1p7pbyzib979rxzp4ivzvi5k4f5ivp4ygnp597s";
11+ sha256 = "1xljm7xmb4ldg3wx8s9kw1spffg4ywk4r1jqfa743czd2xxmqavl";
1212 };
1313
14− nativeBuildInputs = [ go gox removeReferencesTo ];
14+ modSha256 = "13pr3piv6hrsc562qagpn1h5wckiziyfqraj13172hdglz3n2i7q";
1515
16− preBuild = ''
17− patchShebangs ./
18− substituteInPlace scripts/build.sh --replace 'git rev-parse HEAD' 'echo ${src.rev}'
19− sed -i s/'^GIT_DIRTY=.*'/'GIT_DIRTY="+NixOS"'/ scripts/build.sh
20−
21− mkdir -p .git/hooks src/github.com/hashicorp
22− ln -s $(pwd) src/github.com/hashicorp/vault
23−
24− export GOPATH=$(pwd)
25− export GOCACHE="$TMPDIR/go-cache"
26− '';
27−
28− installPhase = ''
29− mkdir -p $out/bin $out/share/bash-completion/completions
30−
31− cp pkg/*/* $out/bin/
32− find $out/bin -type f -exec remove-references-to -t ${go} '{}' +
16+ buildFlagsArray = [
17+ "-tags='vault'"
18+ "-ldflags=\"-X github.com/hashicorp/vault/sdk/version.GitCommit='v${version}'\""
19+ ];
3320
21+ postInstall = ''
22+ mkdir -p $out/share/bash-completion/completions
3423 echo "complete -C $out/bin/vault vault" > $out/share/bash-completion/completions/vault
3524 '';
3625