about summary refs log tree commit diff
path: root/pkgs/tools/security
diff options
context:
space:
mode:
authorTimothy DeHerrera <tim.deh@pm.me>2022-01-12 12:58:22 -0700
committerGitHub <noreply@github.com>2022-01-12 12:58:22 -0700
commit5a91f482ff31a229b532158fa0061c9d29eb808b (patch)
tree248c0a0dcb7de7532361427ad2d23967ad3c7622 /pkgs/tools/security
parent6ba5d82e36edb977f3f9846dc3b683436ca6b6cf (diff)
parent933c7f0902dfa64a3a727c975c7c53ab73d17d80 (diff)
Merge pull request #151814 from jonringer/add-spire
spire: init at 1.1.2
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r--pkgs/tools/security/spire/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/tools/security/spire/default.nix b/pkgs/tools/security/spire/default.nix
new file mode 100644
index 0000000000000..c5d33645f1145
--- /dev/null
+++ b/pkgs/tools/security/spire/default.nix
@@ -0,0 +1,36 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "spire";
+  version = "1.1.2";
+
+  outputs = [ "out" "agent" "server" ];
+
+  src = fetchFromGitHub {
+    owner = "spiffe";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-MX2kbdLj72S2WBceUW/3ps34Bcsf/VArK8RN4r13wQY=";
+  };
+
+  vendorSha256 = "sha256-ZRcXMNKhNY3W5fV9q/V7xsnODoG6KWHrzpWte9hx/Ms=";
+
+  subPackages = [ "cmd/spire-agent" "cmd/spire-server" ];
+
+  # Usually either the agent or server is needed for a given use case, but not both
+  postInstall = ''
+    mkdir -vp $agent/bin $server/bin
+    mv -v $out/bin/spire-agent $agent/bin/
+    mv -v $out/bin/spire-server $server/bin/
+
+    ln -vs $agent/bin/spire-agent $out/bin/spire-agent
+    ln -vs $server/bin/spire-server $out/bin/spire-server
+  '';
+
+  meta = with lib; {
+    description = "The SPIFFE Runtime Environment";
+    homepage = "github.com/spiffe/spire";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ jonringer ];
+  };
+}