about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/se
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-03-22 16:41:59 +0100
committerAlyssa Ross <hi@alyssa.is>2024-03-22 16:41:59 +0100
commit46a88117a05c3469af5d99433af140c3de8ca088 (patch)
treed7f0557756d8f07a3081b3498c05ddc5a8ad429d /nixpkgs/pkgs/by-name/se
parente97457545cea0b2ca421da257c83d8f1ef451d85 (diff)
parenta343533bccc62400e8a9560423486a3b6c11a23b (diff)
downloadnixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.gz
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.bz2
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.lz
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.xz
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.zst
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.zip
Merge commit 'a343533bccc62400e8a9560423486a3b6c11a23b'
Diffstat (limited to 'nixpkgs/pkgs/by-name/se')
-rw-r--r--nixpkgs/pkgs/by-name/se/sequoia-sq/package.nix80
1 files changed, 80 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/se/sequoia-sq/package.nix b/nixpkgs/pkgs/by-name/se/sequoia-sq/package.nix
new file mode 100644
index 000000000000..54e19ba073fa
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/se/sequoia-sq/package.nix
@@ -0,0 +1,80 @@
+{ stdenv
+, fetchFromGitLab
+, fetchpatch
+, lib
+, darwin
+, nettle
+, nix-update-script
+, rustPlatform
+, pkg-config
+, capnproto
+, installShellFiles
+, openssl
+, sqlite
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "sequoia-sq";
+  version = "0.34.0";
+
+  src = fetchFromGitLab {
+    owner = "sequoia-pgp";
+    repo = "sequoia-sq";
+    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=";
+
+  nativeBuildInputs = [
+    pkg-config
+    rustPlatform.bindgenHook
+    capnproto
+    installShellFiles
+  ];
+
+  buildInputs = [
+    openssl
+    sqlite
+    nettle
+  ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]);
+
+  # Sometimes, tests fail on CI (ofborg) & hydra without this
+  checkFlags = [
+    # doctest for sequoia-ipc fail for some reason
+    "--skip=macros::assert_send_and_sync"
+    "--skip=macros::time_it"
+  ];
+
+  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; {
+    description = "A cool new OpenPGP implementation";
+    homepage = "https://sequoia-pgp.org/";
+    changelog = "https://gitlab.com/sequoia-pgp/sequoia-sq/-/blob/v${version}/NEWS";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ minijackson doronbehar ];
+    mainProgram = "sq";
+  };
+}