2021-05-20 23:08:51 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchCrate, installShellFiles
|
2021-10-08 15:17:17 +00:00
|
|
|
, libgpg-error, gpgme, gettext, openssl, Security
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "sheesy-cli";
|
|
|
|
version = "4.0.11";
|
|
|
|
|
|
|
|
src = fetchCrate {
|
|
|
|
inherit version pname;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-rJ/V9pJgmqERgjD0FQ/oqhZQlIeN4/3ECx15/FOUQdA=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
cargoHash = "sha256-o2XRvzw54x6xv81l97s1hwc2MC0Ioeyheoz3F+AtKpU=";
|
2021-05-20 23:08:51 +00:00
|
|
|
cargoDepsName = pname;
|
|
|
|
|
2021-10-08 15:17:17 +00:00
|
|
|
nativeBuildInputs = [ libgpg-error gpgme gettext installShellFiles ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildFeatures = [ "vault" "extract" "completions" "substitute" "process" ];
|
|
|
|
|
|
|
|
checkFeatures = [ ];
|
|
|
|
|
|
|
|
cargoBuildFlags = [ "--bin" "sy" ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
2021-05-20 23:08:51 +00:00
|
|
|
installShellCompletion --cmd sy \
|
|
|
|
--bash <($out/bin/sy completions bash) \
|
|
|
|
--fish <($out/bin/sy completions fish) \
|
|
|
|
--zsh <($out/bin/sy completions zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "'share-secrets-safely' CLI to interact with GPG/pass-like vaults";
|
2021-05-20 23:08:51 +00:00
|
|
|
homepage = "https://share-secrets-safely.github.io/cli/";
|
|
|
|
changelog = "https://github.com/share-secrets-safely/cli/releases/tag/${version}";
|
|
|
|
license = with licenses; [ lgpl21Only ];
|
|
|
|
maintainers = with maintainers; [ devhell ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "sy";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
}
|