From b8abf67c26a7723d41fcb738340c6f6a2814fc5a Mon Sep 17 00:00:00 2001 From: Minijackson Date: Fri, 1 Mar 2024 15:13:20 +0100 Subject: [PATCH 1/3] sequoia-sq: 0.32.0 -> 0.34.0 --- pkgs/tools/security/sequoia-sq/default.nix | 25 +++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/security/sequoia-sq/default.nix b/pkgs/tools/security/sequoia-sq/default.nix index 699a8ee63632..2214b346f87b 100644 --- a/pkgs/tools/security/sequoia-sq/default.nix +++ b/pkgs/tools/security/sequoia-sq/default.nix @@ -6,26 +6,30 @@ , 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="; }; - cargoHash = "sha256-beA0viJVDjfANsPegkc/x2syVp8uGKTMnrPcM7jcvG4="; + cargoHash = "sha256-3ncBpRi0v6g6wwPkSASDwt0d8cOOAUv9BwZaYvnif1U="; nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook + capnproto + installShellFiles ]; buildInputs = [ @@ -41,14 +45,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; { From 98aea3b2945486cd115ea6f759d6f08b79227aa8 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Fri, 1 Mar 2024 15:15:39 +0100 Subject: [PATCH 2/3] sequoia-sq: move to pkgs/by-name/ directory --- .../default.nix => by-name/se/sequoia-sq/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{tools/security/sequoia-sq/default.nix => by-name/se/sequoia-sq/package.nix} (100%) diff --git a/pkgs/tools/security/sequoia-sq/default.nix b/pkgs/by-name/se/sequoia-sq/package.nix similarity index 100% rename from pkgs/tools/security/sequoia-sq/default.nix rename to pkgs/by-name/se/sequoia-sq/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 667e4a9c1a88..2a95011039e1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13040,8 +13040,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 { }; From 036a5ca059048e3c0f573358b071cad3ef86be37 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sat, 2 Mar 2024 23:24:08 +0200 Subject: [PATCH 3/3] sequoia-sq: fix darwin test failure --- pkgs/by-name/se/sequoia-sq/package.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/by-name/se/sequoia-sq/package.nix b/pkgs/by-name/se/sequoia-sq/package.nix index 2214b346f87b..54e19ba073fa 100644 --- a/pkgs/by-name/se/sequoia-sq/package.nix +++ b/pkgs/by-name/se/sequoia-sq/package.nix @@ -1,5 +1,6 @@ { stdenv , fetchFromGitLab +, fetchpatch , lib , darwin , nettle @@ -22,6 +23,14 @@ rustPlatform.buildRustPackage rec { rev = "v${version}"; 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-3ncBpRi0v6g6wwPkSASDwt0d8cOOAUv9BwZaYvnif1U=";