nixpkgs/pkgs/development/libraries/libdeltachat/default.nix

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

84 lines
1.8 KiB
Nix
Raw Normal View History

2021-04-27 17:12:36 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, openssl
, perl
, pkg-config
, python3
2021-04-27 17:12:36 +00:00
, rustPlatform
, 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";
version = "1.112.4";
2021-04-27 17:12:36 +00:00
src = fetchFromGitHub {
owner = "deltachat";
repo = "deltachat-core-rust";
rev = "v${version}";
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
];
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
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
];
nativeCheckInputs = with rustPlatform; [
2021-04-27 17:12:36 +00:00
cargoCheckHook
];
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/";
changelog = "https://github.com/deltachat/deltachat-core-rust/blob/${src.rev}/CHANGELOG.md";
2021-04-27 17:12:36 +00:00
license = licenses.mpl20;
maintainers = with maintainers; [ dotlambda srapenne ];
2021-08-04 10:49:07 +00:00
platforms = platforms.unix;
2021-04-27 17:12:36 +00:00
};
}