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

74 lines
1.4 KiB
Nix
Raw Normal View History

2021-04-27 19:12:36 +02:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, openssl
, perl
, pkg-config
, rustPlatform
, sqlcipher
2021-04-27 19:12:36 +02:00
, sqlite
2021-08-04 12:49:07 +02:00
, fixDarwinDylibNames
, CoreFoundation
, Security
, libiconv
2021-04-27 19:12:36 +02:00
}:
stdenv.mkDerivation rec {
pname = "libdeltachat";
version = "1.72.0";
2021-04-27 19:12:36 +02:00
src = fetchFromGitHub {
owner = "deltachat";
repo = "deltachat-core-rust";
rev = version;
hash = "sha256-/StX22pSQtfOYbBTFL7vh0Y0V038Ohyq+qoDECITD80=";
2021-04-27 19:12:36 +02:00
};
2021-08-04 12:49:07 +02:00
patches = [
# https://github.com/deltachat/deltachat-core-rust/pull/2589
2021-11-07 23:25:23 +01:00
./darwin-dylib.patch
2021-08-06 11:21:50 +02:00
./no-static-lib.patch
2021-08-04 12:49:07 +02:00
];
2021-04-27 19:12:36 +02:00
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-Jwf95oTyGsOikVMKAg+EaDNY78VW+kECD+lhNePSKWE=";
2021-04-27 19:12:36 +02:00
};
nativeBuildInputs = [
cmake
perl
pkg-config
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
2021-08-04 12:49:07 +02:00
]) ++ lib.optionals stdenv.isDarwin [
fixDarwinDylibNames
];
2021-04-27 19:12:36 +02:00
buildInputs = [
openssl
sqlcipher
2021-04-27 19:12:36 +02:00
sqlite
2021-08-04 12:49:07 +02:00
] ++ lib.optionals stdenv.isDarwin [
CoreFoundation
Security
libiconv
2021-04-27 19:12:36 +02:00
];
checkInputs = with rustPlatform; [
cargoCheckHook
];
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/${version}/CHANGELOG.md";
license = licenses.mpl20;
maintainers = with maintainers; [ dotlambda ];
2021-08-04 12:49:07 +02:00
platforms = platforms.unix;
2021-04-27 19:12:36 +02:00
};
}