12 rustPlatform.buildRustPackage rec {
16 src = fetchFromGitHub {
20 hash = "sha256-o8/ENAWzVqs7rokST6xnyu9Q/pKqq/UnKWOFRuIuGes=";
23 cargoHash = "sha256-LcnvCWGVdBxhDgQDoGHXRppGeEpfjOv/F0dZMN2bOF8=";
25 nativeBuildInputs = [ installShellFiles ]
26 ++ lib.optionals stdenv.hostPlatform.isLinux [ python3 ];
29 ++ lib.optionals stdenv.hostPlatform.isLinux [ libxcb ]
30 ++ lib.optionals stdenv.hostPlatform.isDarwin [ SystemConfiguration AppKit ];
36 checkFlags = [ "--skip=kbs2::config::tests::test_find_config_dir" ]
37 ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--skip=test_ragelib_rewrap_keyfile" ];
40 mkdir -p $out/share/kbs2
41 cp -r contrib/ $out/share/kbs2
42 '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
43 installShellCompletion --cmd kbs2 \
44 --bash <($out/bin/kbs2 --completions bash) \
45 --fish <($out/bin/kbs2 --completions fish) \
46 --zsh <($out/bin/kbs2 --completions zsh)
50 description = "Secret manager backed by age";
52 homepage = "https://github.com/woodruffw/kbs2";
53 changelog = "https://github.com/woodruffw/kbs2/blob/v${version}/CHANGELOG.md";
54 license = licenses.mit;