about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/safe/default.nix
blob: 2f0f4501fd2f49bce10a47d964a0a6c3b04a0195 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, stdenv
, buildGoPackage
, fetchFromGitHub
}:

with builtins;

buildGoPackage rec {
  pname = "safe";
  version = "1.5.1";

  src = fetchFromGitHub {
    owner = "starkandwayne";
    repo = "safe";
    rev = "v${version}";
    sha256 = "12gzxrnyl890h79z9yx23m1wwgy8ahm74q4qwi8n2nh7ydq6mn2d";
  };

  goPackagePath = "github.com/starkandwayne/safe";

  preBuild = ''
    buildFlagsArray+=("-ldflags" "-X main.Version=${version}")
  '';

  meta = with lib; {
    description = "A Vault CLI";
    homepage = "https://github.com/starkandwayne/safe";
    license = licenses.mit;
    maintainers = with maintainers; [ eonpatapon ];
  };
}