1693fb2285
GitOrigin-RevId: 420f89ceb267b461eed5d025b6c3c0e57703cc5c
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ stdenv, rustPlatform, fetchFromGitHub, installShellFiles, python3, libxcb, AppKit }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "kbs2";
|
|
version = "0.1.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "woodruffw";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "1zyggdsnxzdbfyxk5jcx9r4ra049ddb51krc81s6nik27d5nivmf";
|
|
};
|
|
|
|
cargoSha256 = "0yxqn8jhcj4rxp0g77jsdp02g5qbc0axaaz1j4gp1bkcww6a9k7v";
|
|
|
|
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 = ''
|
|
mkdir -p $out/share/kbs2
|
|
cp -r contrib/ $out/share/kbs2
|
|
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 ];
|
|
};
|
|
}
|