2020-08-14 17:26:05 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitLab
|
|
|
|
, lib
|
|
|
|
, darwin
|
|
|
|
, nettle
|
2023-04-11 22:55:18 +00:00
|
|
|
, nix-update-script
|
2020-08-14 17:26:05 +00:00
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
2024-03-01 14:13:20 +00:00
|
|
|
, capnproto
|
|
|
|
, installShellFiles
|
2020-08-14 17:26:05 +00:00
|
|
|
, openssl
|
|
|
|
, sqlite
|
2019-07-31 08:07:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2023-06-26 10:14:33 +00:00
|
|
|
pname = "sequoia-sq";
|
2024-07-30 14:53:27 +00:00
|
|
|
version = "0.37.0";
|
2019-07-31 08:07:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "sequoia-pgp";
|
2023-06-14 05:42:44 +00:00
|
|
|
repo = "sequoia-sq";
|
|
|
|
rev = "v${version}";
|
2024-07-30 14:53:27 +00:00
|
|
|
hash = "sha256-D22ECJvbGbnyvusWXfU5F1aLF/ETuMyhAStT5HPWR2U=";
|
2019-07-31 08:07:19 +00:00
|
|
|
};
|
|
|
|
|
2024-07-30 14:53:27 +00:00
|
|
|
cargoHash = "sha256-jFpqZKyRCMkMtOezsYJy3Fy1WXUPyn709wZxuwKlSYI=";
|
2022-10-28 15:01:42 +00:00
|
|
|
|
2019-07-31 08:07:19 +00:00
|
|
|
nativeBuildInputs = [
|
2020-08-14 17:26:05 +00:00
|
|
|
pkg-config
|
2023-05-27 23:33:12 +00:00
|
|
|
rustPlatform.bindgenHook
|
2024-03-01 14:13:20 +00:00
|
|
|
capnproto
|
|
|
|
installShellFiles
|
2019-07-31 08:07:19 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
sqlite
|
|
|
|
nettle
|
2024-01-02 09:22:31 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]);
|
2019-07-31 08:07:19 +00:00
|
|
|
|
2022-07-21 02:57:22 +00:00
|
|
|
checkFlags = [
|
2024-07-30 14:53:27 +00:00
|
|
|
# https://gitlab.com/sequoia-pgp/sequoia-sq/-/issues/297
|
|
|
|
"--skip=sq_autocrypt_import"
|
2022-07-21 02:57:22 +00:00
|
|
|
];
|
2020-06-17 10:44:24 +00:00
|
|
|
|
2024-07-30 14:53:27 +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/";
|
2019-07-31 08:07:19 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2023-04-11 22:55:18 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2024-07-30 15:06:26 +00:00
|
|
|
meta = {
|
2019-07-31 08:07:19 +00:00
|
|
|
description = "Cool new OpenPGP implementation";
|
|
|
|
homepage = "https://sequoia-pgp.org/";
|
2023-06-14 05:42:44 +00:00
|
|
|
changelog = "https://gitlab.com/sequoia-pgp/sequoia-sq/-/blob/v${version}/NEWS";
|
2024-07-30 15:06:26 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with lib.maintainers; [ minijackson doronbehar ];
|
2022-05-05 00:46:39 +00:00
|
|
|
mainProgram = "sq";
|
2019-07-31 08:07:19 +00:00
|
|
|
};
|
|
|
|
}
|