nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at litex 82 lines 1.8 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, cargo 5, cmake 6, openssl 7, perl 8, pkg-config 9, python3 10, rustPlatform 11, sqlcipher 12, sqlite 13, fixDarwinDylibNames 14, CoreFoundation 15, Security 16, SystemConfiguration 17, libiconv 18}: 19 20stdenv.mkDerivation rec { 21 pname = "libdeltachat"; 22 version = "1.116.0"; 23 24 src = fetchFromGitHub { 25 owner = "deltachat"; 26 repo = "deltachat-core-rust"; 27 rev = "v${version}"; 28 hash = "sha256-fSTte2rqy0w4zk9Vh4y3/UWplR0hvwdBqSoSYjoUhPg="; 29 }; 30 31 patches = [ 32 ./no-static-lib.patch 33 ]; 34 35 cargoDeps = rustPlatform.importCargoLock { 36 lockFile = ./Cargo.lock; 37 outputHashes = { 38 "email-0.0.21" = "sha256-Ys47MiEwVZenRNfenT579Rb17ABQ4QizVFTWUq3+bAY="; 39 "encoded-words-0.2.0" = "sha256-KK9st0hLFh4dsrnLd6D8lC6pRFFs8W+WpZSGMGJcosk="; 40 "lettre-0.9.2" = "sha256-+hU1cFacyyeC9UGVBpS14BWlJjHy90i/3ynMkKAzclk="; 41 "quinn-proto-0.9.2" = "sha256-N1gD5vMsBEHO4Fz4ZYEKZA8eE/VywXNXssGcK6hjvpg="; 42 }; 43 }; 44 45 nativeBuildInputs = [ 46 cmake 47 perl 48 pkg-config 49 rustPlatform.cargoSetupHook 50 cargo 51 ] ++ lib.optionals stdenv.isDarwin [ 52 fixDarwinDylibNames 53 ]; 54 55 buildInputs = [ 56 openssl 57 sqlcipher 58 sqlite 59 ] ++ lib.optionals stdenv.isDarwin [ 60 CoreFoundation 61 Security 62 SystemConfiguration 63 libiconv 64 ]; 65 66 nativeCheckInputs = with rustPlatform; [ 67 cargoCheckHook 68 ]; 69 70 passthru.tests = { 71 python = python3.pkgs.deltachat; 72 }; 73 74 meta = with lib; { 75 description = "Delta Chat Rust Core library"; 76 homepage = "https://github.com/deltachat/deltachat-core-rust/"; 77 changelog = "https://github.com/deltachat/deltachat-core-rust/blob/${src.rev}/CHANGELOG.md"; 78 license = licenses.mpl20; 79 maintainers = with maintainers; [ dotlambda srapenne ]; 80 platforms = platforms.unix; 81 }; 82}