3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/libdeltachat/default.nix

72 lines
1.4 KiB
Nix
Raw Normal View History

2021-04-27 18:12:36 +01:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, openssl
, perl
, pkg-config
, rustPlatform
, sqlite
2021-08-04 11:49:07 +01:00
, fixDarwinDylibNames
, CoreFoundation
, Security
, libiconv
2021-04-27 18:12:36 +01:00
}:
stdenv.mkDerivation rec {
pname = "libdeltachat";
version = "1.69.0";
2021-04-27 18:12:36 +01:00
src = fetchFromGitHub {
owner = "deltachat";
repo = "deltachat-core-rust";
rev = version;
hash = "sha256-yW6MXDb7kiI24akJrEPHeb4bI8jEldBcPYx+5+dwJR0=";
2021-04-27 18:12:36 +01:00
};
2021-08-04 11:49:07 +01:00
patches = [
# https://github.com/deltachat/deltachat-core-rust/pull/2589
2021-11-07 22:25:23 +00:00
./darwin-dylib.patch
2021-08-06 10:21:50 +01:00
./no-static-lib.patch
2021-08-04 11:49:07 +01:00
];
2021-04-27 18:12:36 +01:00
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-76TraZCJhppPhkdQfAf1XqOoK7RS+VoYIp2keTn4es4=";
2021-04-27 18:12:36 +01:00
};
nativeBuildInputs = [
cmake
perl
pkg-config
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
2021-08-04 11:49:07 +01:00
]) ++ lib.optionals stdenv.isDarwin [
fixDarwinDylibNames
];
2021-04-27 18:12:36 +01:00
buildInputs = [
openssl
sqlite
2021-08-04 11:49:07 +01:00
] ++ lib.optionals stdenv.isDarwin [
CoreFoundation
Security
libiconv
2021-04-27 18:12:36 +01: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 11:49:07 +01:00
platforms = platforms.unix;
2021-04-27 18:12:36 +01:00
};
}