deltachat-tauri: init at 2.49.1

(cherry picked from commit 1c4d9720da)
This commit is contained in:
Robert Schütz 2025-03-21 22:14:07 -07:00 committed by phanirithvij
commit f81e9b1680
No known key found for this signature in database

View file

@ -0,0 +1,109 @@
{
apple-sdk_14,
cargo-tauri,
darwin,
fetchFromGitHub,
fetchPnpmDeps,
gst_all_1,
lib,
libayatana-appindicator,
makeWrapper,
nodejs,
openssl,
perl,
pkg-config,
pnpm_9,
pnpmConfigHook,
python3,
rustPlatform,
stdenv,
versionCheckHook,
webkitgtk_4_1,
wrapGAppsHook4,
}:
let
pnpm = pnpm_9;
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "deltachat-tauri";
version = "2.49.1";
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "deltachat";
repo = "deltachat-desktop";
tag = "v${finalAttrs.version}";
hash = "sha256-JTbhKOTtPNlromdOsdekw6hhuE4gRwm1QB+5qaKy53o=";
};
pnpmDeps = fetchPnpmDeps {
inherit (finalAttrs) pname version src;
inherit pnpm;
fetcherVersion = 3;
hash = "sha256-UZ6/OTUtIiOA1D5PanY4aS+VCBNj/AIbIGYe1eibGMQ=";
};
cargoHash = "sha256-xxO17cpZ86Pg/zlfoEYLdBkY9MstsgNqoJbPWxTaXrw=";
postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace $cargoDepsCopy/source-registry-0/libappindicator-sys-*/src/lib.rs \
--replace-fail libayatana-appindicator3.so.1 '${libayatana-appindicator}/lib/libayatana-appindicator3.so.1'
'';
nativeBuildInputs = [
cargo-tauri.hook
nodejs
perl
pnpm
pnpmConfigHook
]
++ lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
python3
wrapGAppsHook4
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.autoSignDarwinBinariesHook
];
buildInputs =
lib.optionals stdenv.hostPlatform.isLinux [
gst_all_1.gst-libav
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-vaapi
gst_all_1.gstreamer
libayatana-appindicator
openssl
webkitgtk_4_1
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_14
];
buildAndTestSubdir = "packages/target-tauri";
env = {
VERSION_INFO_GIT_REF = finalAttrs.src.tag;
};
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
install -Dm 444 images/tray/deltachat.svg "$out/share/icons/hicolor/scalable/apps/deltachat-tauri.svg"
'';
nativeInstallCheckInputs = [
versionCheckHook
];
meta = {
changelog = "https://github.com/deltachat/deltachat-desktop/blob/${finalAttrs.src.tag}/CHANGELOG.md";
description = "Email-based instant messaging for Desktop";
homepage = "https://github.com/deltachat/deltachat-desktop";
license = lib.licenses.gpl3Plus;
mainProgram = "deltachat-tauri";
maintainers = [ lib.maintainers.dotlambda ];
platforms = lib.platforms.darwin ++ lib.platforms.linux;
};
})