2021-04-27 17:12:36 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, openssl
|
|
|
|
, perl
|
|
|
|
, pkg-config
|
2022-05-05 18:16:38 +00:00
|
|
|
, python3
|
2021-04-27 17:12:36 +00:00
|
|
|
, rustPlatform
|
2022-01-24 02:40:16 +00:00
|
|
|
, sqlcipher
|
2021-04-27 17:12:36 +00:00
|
|
|
, sqlite
|
2021-08-04 10:49:07 +00:00
|
|
|
, fixDarwinDylibNames
|
|
|
|
, CoreFoundation
|
|
|
|
, Security
|
2023-03-30 21:15:01 +00:00
|
|
|
, SystemConfiguration
|
2021-08-04 10:49:07 +00:00
|
|
|
, libiconv
|
2021-04-27 17:12:36 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libdeltachat";
|
2023-03-31 18:10:40 +00:00
|
|
|
version = "1.112.4";
|
2021-04-27 17:12:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deltachat";
|
|
|
|
repo = "deltachat-core-rust";
|
2023-02-24 19:42:31 +00:00
|
|
|
rev = "v${version}";
|
2023-03-31 18:10:40 +00:00
|
|
|
hash = "sha256-Z6Hs8NYqMyXyTyUsR9N0Eghgh8Ltrt1uMGKuz0aCRdQ=";
|
2021-04-27 17:12:36 +00:00
|
|
|
};
|
|
|
|
|
2021-08-04 10:49:07 +00:00
|
|
|
patches = [
|
2021-08-06 09:21:50 +00:00
|
|
|
./no-static-lib.patch
|
2021-08-04 10:49:07 +00:00
|
|
|
];
|
|
|
|
|
2023-03-25 23:16:46 +00:00
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"async-imap-0.6.0" = "sha256-q6ZDm+4i+EtiMgkW/8LQ/TkDO/sj0p7KJhpYE76zAjo=";
|
|
|
|
"email-0.0.21" = "sha256-Ys47MiEwVZenRNfenT579Rb17ABQ4QizVFTWUq3+bAY=";
|
|
|
|
"encoded-words-0.2.0" = "sha256-KK9st0hLFh4dsrnLd6D8lC6pRFFs8W+WpZSGMGJcosk=";
|
|
|
|
"lettre-0.9.2" = "sha256-+hU1cFacyyeC9UGVBpS14BWlJjHy90i/3ynMkKAzclk=";
|
|
|
|
"quinn-proto-0.9.2" = "sha256-N1gD5vMsBEHO4Fz4ZYEKZA8eE/VywXNXssGcK6hjvpg=";
|
|
|
|
};
|
2021-04-27 17:12:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
perl
|
|
|
|
pkg-config
|
|
|
|
] ++ (with rustPlatform; [
|
|
|
|
cargoSetupHook
|
|
|
|
rust.cargo
|
2021-08-04 10:49:07 +00:00
|
|
|
]) ++ lib.optionals stdenv.isDarwin [
|
|
|
|
fixDarwinDylibNames
|
|
|
|
];
|
2021-04-27 17:12:36 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
2022-01-24 02:40:16 +00:00
|
|
|
sqlcipher
|
2021-04-27 17:12:36 +00:00
|
|
|
sqlite
|
2021-08-04 10:49:07 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
CoreFoundation
|
|
|
|
Security
|
2023-03-30 21:15:01 +00:00
|
|
|
SystemConfiguration
|
2021-08-04 10:49:07 +00:00
|
|
|
libiconv
|
2021-04-27 17:12:36 +00:00
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = with rustPlatform; [
|
2021-04-27 17:12:36 +00:00
|
|
|
cargoCheckHook
|
|
|
|
];
|
|
|
|
|
2022-05-05 18:16:38 +00:00
|
|
|
passthru.tests = {
|
|
|
|
python = python3.pkgs.deltachat;
|
|
|
|
};
|
|
|
|
|
2021-04-27 17:12:36 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Delta Chat Rust Core library";
|
|
|
|
homepage = "https://github.com/deltachat/deltachat-core-rust/";
|
2023-02-24 19:42:31 +00:00
|
|
|
changelog = "https://github.com/deltachat/deltachat-core-rust/blob/${src.rev}/CHANGELOG.md";
|
2021-04-27 17:12:36 +00:00
|
|
|
license = licenses.mpl20;
|
2023-03-05 23:01:59 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda srapenne ];
|
2021-08-04 10:49:07 +00:00
|
|
|
platforms = platforms.unix;
|
2021-04-27 17:12:36 +00:00
|
|
|
};
|
|
|
|
}
|