mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 14:43:37 +00:00
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ stdenv, rustPlatform, fetchFromGitHub, installShellFiles, python3, libxcb, AppKit }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "kbs2";
|
|
version = "0.1.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "woodruffw";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "1zp4gpbqhivmp7lpm10xb6ahx1z7nsijz7pi5i0bndv0y9mr609p";
|
|
};
|
|
|
|
cargoSha256 = "1inqz4whqw9mb3m22kv44f255m3cjr66pc5ncdw2rgpy3zjh4p3z";
|
|
|
|
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 ];
|
|
};
|
|
}
|