git.iko.soy/typeable/nixpkgs
on master help sign in
aws-vault: add wrapper and simple install check (#121155)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Co-authored-by: Yurii Matsiuk <ymatsiuk@users.noreply.github.com>

commitbe99e67190f8ba704b68b88b29b64bd260c60d2c authorYurii Matsiuk <24990891+ymatsiuk@users.noreply.github.com> dateFri 30 Apr 2021, 13:21 (6 years ago) parent989006a
1 file changed+15−2
pkgs/tools/admin/aws-vault/default.nix+15−2
pkgs/tools/admin/aws-vault/default.nix+15−2
@@ -1,4 +1,10 @@
1−{ buildGoModule, lib, fetchFromGitHub, installShellFiles }:
1+{ buildGoModule
2+, fetchFromGitHub
3+, installShellFiles
4+, lib
5+, makeWrapper
6+, xdg-utils
7+}:
28buildGoModule rec {
39 pname = "aws-vault";
410 version = "6.3.1";
@@ -12,9 +18,10 @@ buildGoModule rec {
1218
1319 vendorSha256 = "sha256-Lb5iiuT/Fd3RMt98AafIi9I0FHJaSpJ8pH7r4yZiiiw=";
1420
15− nativeBuildInputs = [ installShellFiles ];
21+ nativeBuildInputs = [ installShellFiles makeWrapper ];
1622
1723 postInstall = ''
24+ wrapProgram $out/bin/aws-vault --prefix PATH : ${lib.makeBinPath [ xdg-utils ]}
1825 installShellCompletion --cmd aws-vault \
1926 --bash $src/contrib/completions/bash/aws-vault.bash \
2027 --fish $src/contrib/completions/fish/aws-vault.fish \
@@ -32,6 +39,12 @@ buildGoModule rec {
3239 -X main.Version=v${version}
3340 '';
3441
42+ doInstallCheck = true;
43+
44+ installCheckPhase = ''
45+ $out/bin/aws-vault --version 2>&1 | grep ${version} > /dev/null
46+ '';
47+
3548 meta = with lib; {
3649 description =
3750 "A vault for securely storing and accessing AWS credentials in development environments";