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

75 lines
1.6 KiB
Nix
Raw Normal View History

2021-04-27 17:12:36 +00:00
{ lib
, stdenv
, fetchFromGitHub
2021-08-04 10:49:07 +00:00
, fetchpatch
2021-04-27 17:12:36 +00:00
, cmake
, openssl
, perl
, pkg-config
, rustPlatform
, sqlite
2021-08-04 10:49:07 +00:00
, fixDarwinDylibNames
, CoreFoundation
, Security
, libiconv
2021-04-27 17:12:36 +00:00
}:
stdenv.mkDerivation rec {
pname = "libdeltachat";
version = "1.56.0";
2021-04-27 17:12:36 +00:00
src = fetchFromGitHub {
owner = "deltachat";
repo = "deltachat-core-rust";
rev = version;
sha256 = "sha256-ZyVEI6q+GzHLEFH01TxS7NqwT7zqVgg0vduyf/fibB8=";
2021-04-27 17:12:36 +00:00
};
2021-08-04 10:49:07 +00:00
patches = [
# https://github.com/deltachat/deltachat-core-rust/pull/2589
(fetchpatch {
url = "https://github.com/deltachat/deltachat-core-rust/commit/408467e85d04fbbfd6bed5908d84d9e995943487.patch";
sha256 = "1j2ywaazglgl6370js34acrg0wrh0b7krqg05dfjf65n527lzn59";
})
];
2021-04-27 17:12:36 +00:00
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
sha256 = "0pb1rcv45xa95ziqap94yy52fy02vh401iqsgi18nm1j6iyyngc8";
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
sqlite
2021-08-04 10:49:07 +00:00
] ++ lib.optionals stdenv.isDarwin [
CoreFoundation
Security
libiconv
2021-04-27 17:12:36 +00: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 10:49:07 +00:00
platforms = platforms.unix;
2021-04-27 17:12:36 +00:00
};
}