1 { lib, stdenv, rustPlatform, fetchCrate, installShellFiles
2 , libgpg-error, gpgme, gettext, openssl, Security
5 rustPlatform.buildRustPackage rec {
10 inherit version pname;
11 hash = "sha256-rJ/V9pJgmqERgjD0FQ/oqhZQlIeN4/3ECx15/FOUQdA=";
14 cargoHash = "sha256-o2XRvzw54x6xv81l97s1hwc2MC0Ioeyheoz3F+AtKpU=";
15 cargoDepsName = pname;
17 nativeBuildInputs = [ libgpg-error gpgme gettext installShellFiles ];
19 buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
21 buildFeatures = [ "vault" "extract" "completions" "substitute" "process" ];
25 cargoBuildFlags = [ "--bin" "sy" ];
27 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
28 installShellCompletion --cmd sy \
29 --bash <($out/bin/sy completions bash) \
30 --fish <($out/bin/sy completions fish) \
31 --zsh <($out/bin/sy completions zsh)
35 description = "'share-secrets-safely' CLI to interact with GPG/pass-like vaults";
36 homepage = "https://share-secrets-safely.github.io/cli/";
37 changelog = "https://github.com/share-secrets-safely/cli/releases/tag/${version}";
38 license = with licenses; [ lgpl21Only ];
39 maintainers = with maintainers; [ devhell ];