a3d4720129
GitOrigin-RevId: e182da8622a354d44c39b3d7a542dc12cd7baa5f
76 lines
1.4 KiB
Nix
76 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, openssl
|
|
, perl
|
|
, pkg-config
|
|
, python3
|
|
, rustPlatform
|
|
, sqlcipher
|
|
, sqlite
|
|
, fixDarwinDylibNames
|
|
, CoreFoundation
|
|
, Security
|
|
, libiconv
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libdeltachat";
|
|
version = "1.104.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "deltachat";
|
|
repo = "deltachat-core-rust";
|
|
rev = version;
|
|
hash = "sha256-+FQ6XE+CtvSNSgpEr8h0mcr9DCC6TvGgLrYGdw0Ve2o=";
|
|
};
|
|
|
|
patches = [
|
|
./no-static-lib.patch
|
|
];
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
inherit src;
|
|
name = "${pname}-${version}";
|
|
hash = "sha256-c3tt+nYZksI/VhJk4bNHu9ZXeDTaA2aLAQo1BmuF+2g=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
perl
|
|
pkg-config
|
|
] ++ (with rustPlatform; [
|
|
cargoSetupHook
|
|
rust.cargo
|
|
]) ++ lib.optionals stdenv.isDarwin [
|
|
fixDarwinDylibNames
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
sqlcipher
|
|
sqlite
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
CoreFoundation
|
|
Security
|
|
libiconv
|
|
];
|
|
|
|
checkInputs = with rustPlatform; [
|
|
cargoCheckHook
|
|
];
|
|
|
|
passthru.tests = {
|
|
python = python3.pkgs.deltachat;
|
|
};
|
|
|
|
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 ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|