Unverified Commit 49379a03 authored by Doron Behar's avatar Doron Behar Committed by GitHub
Browse files

Merge pull request #292596 from minijackson/sequoia-sq-0.34

sequoia-sq: 0.32.0 -> 0.34.0
parents acdc68ae 036a5ca0
Loading
Loading
Loading
Loading
+26 −8
Original line number Diff line number Diff line
{ stdenv
, fetchFromGitLab
, fetchpatch
, lib
, darwin
, nettle
, nix-update-script
, rustPlatform
, pkg-config
, capnproto
, installShellFiles
, openssl
, sqlite
}:

rustPlatform.buildRustPackage rec {
  pname = "sequoia-sq";
  version = "0.32.0";
  version = "0.34.0";

  src = fetchFromGitLab {
    owner = "sequoia-pgp";
    repo = "sequoia-sq";
    rev = "v${version}";
    hash = "sha256-2a6LIW5ohSi7fbMwk/wmNJ0AOz5JIXiXJI7EoVKv1Sk=";
    hash = "sha256-voFektWZnkmIQzI7s5nKzVVWQtEhzk2GKtxX926RtxU=";
  };
  patches = [
    # Fixes test failing on Darwin, see:
    # https://gitlab.com/sequoia-pgp/sequoia-sq/-/issues/211
    (fetchpatch {
      url = "https://gitlab.com/sequoia-pgp/sequoia-sq/-/commit/21221a935e0d058ed269ae6c8f45c5fa7ea0d598.patch";
      hash = "sha256-ZjTl3EumeFwMJUl+qMpX+P2maYz4Ow/Tn9KwYbHDbes=";
    })
  ];

  cargoHash = "sha256-beA0viJVDjfANsPegkc/x2syVp8uGKTMnrPcM7jcvG4=";
  cargoHash = "sha256-3ncBpRi0v6g6wwPkSASDwt0d8cOOAUv9BwZaYvnif1U=";

  nativeBuildInputs = [
    pkg-config
    rustPlatform.bindgenHook
    capnproto
    installShellFiles
  ];

  buildInputs = [
@@ -41,14 +54,19 @@ rustPlatform.buildRustPackage rec {
    "--skip=macros::time_it"
  ];

  # Install manual pages, see https://gitlab.com/sequoia-pgp/sequoia-sq#building
  postInstall = ''
    mkdir -p $out/share/man
    SQ_MAN=$out/share/man/man1 cargo run
  '';
  env.ASSET_OUT_DIR = "/tmp/";

  doCheck = true;

  postInstall = ''
    installManPage /tmp/man-pages/*.*
    installShellCompletion \
      --cmd sq \
      --bash /tmp/shell-completions/sq.bash \
      --fish /tmp/shell-completions/sq.fish \
      --zsh /tmp/shell-completions/_sq
  '';

  passthru.updateScript = nix-update-script { };

  meta = with lib; {
+0 −2
Original line number Diff line number Diff line
@@ -13022,8 +13022,6 @@ with pkgs;
  seqdiag = with python3Packages; toPythonApplication seqdiag;
  sequoia-sq = callPackage ../tools/security/sequoia-sq { };
  sequoia-sqv = callPackage ../tools/security/sequoia-sqv { };
  sequoia-sqop = callPackage ../tools/security/sequoia-sqop { };