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
|
|
|
|
, openssl
|
|
|
|
, sqlite
|
2019-07-31 08:07:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2023-06-26 10:14:33 +00:00
|
|
|
pname = "sequoia-sq";
|
2023-08-02 05:21:43 +00:00
|
|
|
version = "0.31.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}";
|
2023-08-02 05:21:43 +00:00
|
|
|
hash = "sha256-rrNN52tDM3CEGyNvsT3x4GmfWIpU8yoT2XsgOhPyLjo=";
|
2019-07-31 08:07:19 +00:00
|
|
|
};
|
|
|
|
|
2023-08-02 05:21:43 +00:00
|
|
|
cargoHash = "sha256-B+gtUzUB99At+kusupsN/v6sCbpXs36/EbpTL3gUxnc=";
|
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
|
2019-07-31 08:07:19 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
sqlite
|
|
|
|
nettle
|
2023-06-14 05:42:44 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
2019-07-31 08:07:19 +00:00
|
|
|
|
2020-08-14 17:26:05 +00:00
|
|
|
# Sometimes, tests fail on CI (ofborg) & hydra without this
|
2022-07-21 02:57:22 +00:00
|
|
|
checkFlags = [
|
|
|
|
# doctest for sequoia-ipc fail for some reason
|
|
|
|
"--skip=macros::assert_send_and_sync"
|
|
|
|
"--skip=macros::time_it"
|
|
|
|
];
|
2020-06-17 10:44:24 +00:00
|
|
|
|
2023-06-14 05:42:44 +00:00
|
|
|
# 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
|
2019-07-31 08:07:19 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2023-04-11 22:55:18 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-07-31 08:07:19 +00:00
|
|
|
description = "A 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";
|
2021-08-31 15:10:47 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2019-07-31 08:07:19 +00:00
|
|
|
maintainers = with maintainers; [ minijackson doronbehar ];
|
2022-05-05 00:46:39 +00:00
|
|
|
mainProgram = "sq";
|
2019-07-31 08:07:19 +00:00
|
|
|
};
|
|
|
|
}
|