about summary refs log tree commit diff
path: root/pkgs/tools/security/kbs2
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2020-07-01 04:58:37 -0500
committerGitHub <noreply@github.com>2020-07-01 04:58:37 -0500
commit480191df6f0c5a3b1c4662f3e8a9f71f1e8e2879 (patch)
treef2b08d798093f2cebfd340467047afd6392b879d /pkgs/tools/security/kbs2
parentc323751a71e73cf202086792b3bf3272b7350bf8 (diff)
kbs2: init at 0.1.1 (#91911)
Diffstat (limited to 'pkgs/tools/security/kbs2')
-rw-r--r--pkgs/tools/security/kbs2/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/tools/security/kbs2/default.nix b/pkgs/tools/security/kbs2/default.nix
new file mode 100644
index 0000000000000..354b28b9fa2f5
--- /dev/null
+++ b/pkgs/tools/security/kbs2/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, rustPlatform, fetchFromGitHub, installShellFiles, python3, libxcb, AppKit }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "kbs2";
+  version = "0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "woodruffw";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0761g8cl9v7jj444vp83zq9f1shrddqq20pd41d5mbl6f8qpk4m5";
+  };
+
+  cargoSha256 = "0vzjkw1g6saz4nwy823dpip02jg2f21rsd8kkpra206b8i6q0mfg";
+
+  nativeBuildInputs = [ installShellFiles ]
+    ++ stdenv.lib.optionals stdenv.isLinux [ python3 ];
+
+  buildInputs = [ ]
+    ++ stdenv.lib.optionals stdenv.isLinux [ libxcb ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ AppKit ];
+
+  preCheck = ''
+    export HOME=$TMPDIR
+  '';
+
+  checkFlagsArray = [ "--skip=kbs2::config::tests::test_find_config_dir" ];
+
+  postInstall = ''
+    for shell in bash fish zsh; do
+      $out/bin/kbs2 --completions $shell > kbs2.$shell
+      installShellCompletion kbs2.$shell
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A secret manager backed by age";
+    homepage = "https://github.com/woodruffw/kbs2";
+    license = licenses.mit;
+    maintainers = [ maintainers.marsam ];
+  };
+}