2021-05-02 19:44:57 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchCrate, installShellFiles
|
2021-09-04 20:05:03 +00:00
|
|
|
, libgpg-error, gpgme, gettext, openssl, Security
|
2021-05-02 19:44:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "sheesy-cli";
|
|
|
|
version = "4.0.11";
|
|
|
|
|
|
|
|
src = fetchCrate {
|
|
|
|
inherit version pname;
|
2024-07-12 18:42:22 +00:00
|
|
|
hash = "sha256-rJ/V9pJgmqERgjD0FQ/oqhZQlIeN4/3ECx15/FOUQdA=";
|
2021-05-02 19:44:57 +00:00
|
|
|
};
|
|
|
|
|
2024-07-03 12:29:10 +00:00
|
|
|
cargoHash = "sha256-o2XRvzw54x6xv81l97s1hwc2MC0Ioeyheoz3F+AtKpU=";
|
2021-05-02 19:44:57 +00:00
|
|
|
cargoDepsName = pname;
|
|
|
|
|
2021-09-04 20:05:03 +00:00
|
|
|
nativeBuildInputs = [ libgpg-error gpgme gettext installShellFiles ];
|
2021-05-02 19:44:57 +00:00
|
|
|
|
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
|
|
|
|
|
2021-11-16 00:38:29 +00:00
|
|
|
buildFeatures = [ "vault" "extract" "completions" "substitute" "process" ];
|
|
|
|
|
|
|
|
checkFeatures = [ ];
|
|
|
|
|
|
|
|
cargoBuildFlags = [ "--bin" "sy" ];
|
|
|
|
|
2024-07-10 11:52:28 +00:00
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
2021-05-02 19:44:57 +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; {
|
|
|
|
description = "'share-secrets-safely' CLI to interact with GPG/pass-like vaults";
|
|
|
|
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-01 19:34:55 +00:00
|
|
|
mainProgram = "sy";
|
2021-05-02 19:44:57 +00:00
|
|
|
};
|
|
|
|
}
|