diff --git a/pkgs/development/libraries/libdeltachat/default.nix b/pkgs/development/libraries/libdeltachat/default.nix index 77315776aca..872429aa091 100644 --- a/pkgs/development/libraries/libdeltachat/default.nix +++ b/pkgs/development/libraries/libdeltachat/default.nix @@ -1,12 +1,17 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , cmake , openssl , perl , pkg-config , rustPlatform , sqlite +, fixDarwinDylibNames +, CoreFoundation +, Security +, libiconv }: stdenv.mkDerivation rec { @@ -20,6 +25,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-ZyVEI6q+GzHLEFH01TxS7NqwT7zqVgg0vduyf/fibB8="; }; + patches = [ + # https://github.com/deltachat/deltachat-core-rust/pull/2589 + (fetchpatch { + url = "https://github.com/deltachat/deltachat-core-rust/commit/408467e85d04fbbfd6bed5908d84d9e995943487.patch"; + sha256 = "1j2ywaazglgl6370js34acrg0wrh0b7krqg05dfjf65n527lzn59"; + }) + ]; + cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; @@ -33,11 +46,17 @@ stdenv.mkDerivation rec { ] ++ (with rustPlatform; [ cargoSetupHook rust.cargo - ]); + ]) ++ lib.optionals stdenv.isDarwin [ + fixDarwinDylibNames + ]; buildInputs = [ openssl sqlite + ] ++ lib.optionals stdenv.isDarwin [ + CoreFoundation + Security + libiconv ]; checkInputs = with rustPlatform; [ @@ -49,7 +68,7 @@ stdenv.mkDerivation rec { homepage = "https://github.com/deltachat/deltachat-core-rust/"; changelog = "https://github.com/deltachat/deltachat-core-rust/blob/${version}/CHANGELOG.md"; license = licenses.mpl20; - platforms = platforms.linux; maintainers = with maintainers; [ dotlambda ]; + platforms = platforms.unix; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5af6ed97f14..6997047e1a0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16520,7 +16520,10 @@ with pkgs; libdeflate = callPackage ../development/libraries/libdeflate { }; - libdeltachat = callPackage ../development/libraries/libdeltachat { }; + libdeltachat = callPackage ../development/libraries/libdeltachat { + inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; + inherit (darwin) libiconv; + }; libdevil = callPackage ../development/libraries/libdevil { inherit (darwin.apple_sdk.frameworks) OpenGL;