From 85c4c223572a50ebecdbb8dbe01e27c9afecd89d Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 27 Jun 2023 11:11:29 +0300 Subject: [PATCH] sequoia-sqop: init at 0.28.0 --- pkgs/tools/security/sequoia-sqop/default.nix | 59 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/tools/security/sequoia-sqop/default.nix diff --git a/pkgs/tools/security/sequoia-sqop/default.nix b/pkgs/tools/security/sequoia-sqop/default.nix new file mode 100644 index 000000000000..b071c82597f0 --- /dev/null +++ b/pkgs/tools/security/sequoia-sqop/default.nix @@ -0,0 +1,59 @@ +{ stdenv +, fetchFromGitLab +, lib +, nettle +, nix-update-script +, installShellFiles +, rustPlatform +, pkg-config +}: + +rustPlatform.buildRustPackage rec { + pname = "sequoia-sqop"; + version = "0.28.0"; + + src = fetchFromGitLab { + owner = "sequoia-pgp"; + # From some reason the repository is not sequoia-sqop - like the command + # generated etc + repo = "sequoia-sop"; + rev = "v${version}"; + hash = "sha256-4A0eZMXzFtojRD5cXQQUVoS32sQ2lWtFll+q6yhnwG4="; + }; + + cargoHash = "sha256-gH5WM+PmciViD+eFVlp8tzdc0KdYy1WZLQi92UEWVG4="; + + nativeBuildInputs = [ + pkg-config + rustPlatform.bindgenHook + installShellFiles + ]; + + buildInputs = [ + nettle + ]; + buildFeatures = [ "cli" ]; + + # Install manual pages + postInstall = '' + mkdir -p $out/share/man + cp -r man-sqop $out/share/man/man1 + installShellCompletion --cmd sqop \ + --bash target/*/release/build/sequoia-sop*/out/sqop.bash \ + --fish target/*/release/build/sequoia-sop*/out/sqop.fish \ + --zsh target/*/release/build/sequoia-sop*/out/_sqop + # Also elv and powershell are generated there + ''; + + doCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = with lib; { + description = "An implementation of the Stateless OpenPGP Command Line Interface using Sequoia"; + homepage = "https://docs.sequoia-pgp.org/sqop/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ doronbehar ]; + mainProgram = "sqop"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 28e9a166ca01..a83c5dbb05e4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12449,6 +12449,8 @@ with pkgs; sequoia-sqv = callPackage ../tools/security/sequoia-sqv { }; + sequoia-sqop = callPackage ../tools/security/sequoia-sqop { }; + sequoia-chameleon-gnupg = callPackage ../tools/security/sequoia-chameleon-gnupg { }; sewer = callPackage ../tools/admin/sewer { };