2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2023-05-24 13:37:59 +00:00
|
|
|
, cargo
|
2021-05-20 23:08:51 +00:00
|
|
|
, cmake
|
|
|
|
, openssl
|
|
|
|
, perl
|
|
|
|
, pkg-config
|
2022-05-18 14:49:53 +00:00
|
|
|
, python3
|
2021-05-20 23:08:51 +00:00
|
|
|
, rustPlatform
|
2022-01-26 04:04:25 +00:00
|
|
|
, sqlcipher
|
2021-05-20 23:08:51 +00:00
|
|
|
, sqlite
|
2021-08-10 14:31:46 +00:00
|
|
|
, fixDarwinDylibNames
|
|
|
|
, CoreFoundation
|
|
|
|
, Security
|
2023-04-12 12:48:02 +00:00
|
|
|
, SystemConfiguration
|
2021-08-10 14:31:46 +00:00
|
|
|
, libiconv
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libdeltachat";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "1.118.0";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deltachat";
|
|
|
|
repo = "deltachat-core-rust";
|
2023-03-04 12:14:45 +00:00
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-1vkmz7LFG420zYETYIf3ayOQEPp+hz7Dr7gULz1nJOs=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
2021-08-10 14:31:46 +00:00
|
|
|
patches = [
|
|
|
|
./no-static-lib.patch
|
|
|
|
];
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"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-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
perl
|
|
|
|
pkg-config
|
2023-05-24 13:37:59 +00:00
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
cargo
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2021-08-10 14:31:46 +00:00
|
|
|
fixDarwinDylibNames
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
2022-01-26 04:04:25 +00:00
|
|
|
sqlcipher
|
2021-05-20 23:08:51 +00:00
|
|
|
sqlite
|
2021-08-10 14:31:46 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
CoreFoundation
|
|
|
|
Security
|
2023-04-12 12:48:02 +00:00
|
|
|
SystemConfiguration
|
2021-08-10 14:31:46 +00:00
|
|
|
libiconv
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = with rustPlatform; [
|
2021-05-20 23:08:51 +00:00
|
|
|
cargoCheckHook
|
|
|
|
];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
passthru.tests = {
|
|
|
|
python = python3.pkgs.deltachat;
|
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Delta Chat Rust Core library";
|
|
|
|
homepage = "https://github.com/deltachat/deltachat-core-rust/";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/deltachat/deltachat-core-rust/blob/${src.rev}/CHANGELOG.md";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.mpl20;
|
2023-03-08 16:32:21 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda srapenne ];
|
2021-08-10 14:31:46 +00:00
|
|
|
platforms = platforms.unix;
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
}
|