mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 05:33:23 +00:00
fa50f57560
https://github.com/woodruffw/kbs2/releases/tag/v0.7.0 https://github.com/woodruffw/kbs2/releases/tag/v0.7.1
56 lines
1.4 KiB
Nix
56 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, python3
|
|
, libxcb
|
|
, AppKit
|
|
, SystemConfiguration
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "kbs2";
|
|
version = "0.7.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "woodruffw";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-lTxHG+Gul9yMdNPXiomP6crzF5J4wIKzeNyEHnlNM/4=";
|
|
};
|
|
|
|
cargoHash = "sha256-X5WlEvOmbZ3STogoFjDhT2zF5Udt6ABaD+f1qBvmNYE=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ]
|
|
++ lib.optionals stdenv.isLinux [ python3 ];
|
|
|
|
buildInputs = [ ]
|
|
++ lib.optionals stdenv.isLinux [ libxcb ]
|
|
++ lib.optionals stdenv.isDarwin [ SystemConfiguration AppKit ];
|
|
|
|
preCheck = ''
|
|
export HOME=$TMPDIR
|
|
'';
|
|
|
|
checkFlags = [ "--skip=kbs2::config::tests::test_find_config_dir" ]
|
|
++ lib.optionals stdenv.isDarwin [ "--skip=test_ragelib_rewrap_keyfile" ];
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/share/kbs2
|
|
cp -r contrib/ $out/share/kbs2
|
|
installShellCompletion --cmd kbs2 \
|
|
--bash <($out/bin/kbs2 --completions bash) \
|
|
--fish <($out/bin/kbs2 --completions fish) \
|
|
--zsh <($out/bin/kbs2 --completions zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A secret manager backed by age";
|
|
homepage = "https://github.com/woodruffw/kbs2";
|
|
changelog = "https://github.com/woodruffw/kbs2/blob/v${version}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.marsam ];
|
|
};
|
|
}
|