nixpkgs/pkgs/by-name/se/sequoia-sq/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv
, fetchFromGitLab
, lib
, darwin
, nettle
, nix-update-script
, rustPlatform
, pkg-config
2024-03-01 14:13:20 +00:00
, capnproto
, installShellFiles
, openssl
, sqlite
}:
rustPlatform.buildRustPackage rec {
2023-06-26 10:14:33 +00:00
pname = "sequoia-sq";
version = "0.37.0";
src = fetchFromGitLab {
owner = "sequoia-pgp";
repo = "sequoia-sq";
rev = "v${version}";
hash = "sha256-D22ECJvbGbnyvusWXfU5F1aLF/ETuMyhAStT5HPWR2U=";
};
cargoHash = "sha256-jFpqZKyRCMkMtOezsYJy3Fy1WXUPyn709wZxuwKlSYI=";
nativeBuildInputs = [
pkg-config
2023-05-27 23:33:12 +00:00
rustPlatform.bindgenHook
2024-03-01 14:13:20 +00:00
capnproto
installShellFiles
];
buildInputs = [
openssl
sqlite
nettle
2024-01-02 09:22:31 +00:00
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]);
2022-07-21 02:57:22 +00:00
checkFlags = [
# https://gitlab.com/sequoia-pgp/sequoia-sq/-/issues/297
"--skip=sq_autocrypt_import"
2022-07-21 02:57:22 +00:00
];
# Needed for tests to be able to create a ~/.local/share/sequoia directory
preCheck = ''
export HOME=$(mktemp -d)
'';
2024-03-01 14:13:20 +00:00
env.ASSET_OUT_DIR = "/tmp/";
doCheck = true;
2024-03-01 14:13:20 +00:00
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 = {
description = "Cool new OpenPGP implementation";
homepage = "https://sequoia-pgp.org/";
changelog = "https://gitlab.com/sequoia-pgp/sequoia-sq/-/blob/v${version}/NEWS";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ minijackson doronbehar ];
mainProgram = "sq";
};
}