From f944147dbb9b4b96f8320c499c68ea319eef06a7 Mon Sep 17 00:00:00 2001 From: devhell Date: Sun, 2 May 2021 20:44:57 +0100 Subject: [PATCH] sheesy-cli: init at 4.0.11 --- pkgs/tools/security/sheesy-cli/default.nix | 37 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/tools/security/sheesy-cli/default.nix diff --git a/pkgs/tools/security/sheesy-cli/default.nix b/pkgs/tools/security/sheesy-cli/default.nix new file mode 100644 index 00000000000..3929dbc8ad1 --- /dev/null +++ b/pkgs/tools/security/sheesy-cli/default.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, rustPlatform, fetchCrate, installShellFiles +, libgpgerror, gpgme, gettext, openssl, Security +}: + +rustPlatform.buildRustPackage rec { + pname = "sheesy-cli"; + version = "4.0.11"; + + src = fetchCrate { + inherit version pname; + sha256 = "1l21ji9zqy8x1g2gvqwdhya505max07ibx1hh88s36k0jbvdb7xc"; + }; + + cargoSha256 = "159a5ph1gxwcgahyr8885lq3c1w76nxzfrfdpyqixqrr7jzx2rd3"; + cargoDepsName = pname; + + cargoBuildFlags = [ "--bin sy" "--features" "vault,extract,completions,substitute,process" ]; + + nativeBuildInputs = [ libgpgerror gpgme gettext installShellFiles ]; + + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + + postInstall = '' + 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 = "The '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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 11d313fc0ed..2fb37e3f49f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3039,6 +3039,10 @@ in shellhub-agent = callPackage ../applications/networking/shellhub-agent { }; + sheesy-cli = callPackage ../tools/security/sheesy-cli { + inherit (darwin.apple_sdk.frameworks) Security; + }; + simdjson = callPackage ../development/libraries/simdjson { }; shipyard = callPackage ../tools/virtualization/shipyard { };