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

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

77 lines
1.5 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
, libiconv
2021-04-27 17:12:36 +00:00
}:
stdenv.mkDerivation rec {
pname = "libdeltachat";
version = "1.112.0";
2021-04-27 17:12:36 +00:00
src = fetchFromGitHub {
owner = "deltachat";
repo = "deltachat-core-rust";
rev = "v${version}";
hash = "sha256-byUQQu+lzqTVufEHoeSd9hrDBWj92JCokzetdRITRns=";
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
];
2021-04-27 17:12:36 +00:00
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-j0Cz1tl6N1JuKt2io+uoqUo/cL/VRVVasJ0CU3X1xtw=";
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
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
};
}