mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
Diff: https://github.com/deltachat/deltachat-desktop/compare/v2.49.1...v2.51.0 Changelog: https://github.com/deltachat/deltachat-desktop/blob/v2.51.0/CHANGELOG.md
110 lines
2.6 KiB
Nix
110 lines
2.6 KiB
Nix
{
|
|
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.51.0";
|
|
__structuredAttrs = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "deltachat";
|
|
repo = "deltachat-desktop";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-ORp8lZcHzswrSCe30cGKpZdyqZCcvqLgu2hwvadMHN0=";
|
|
};
|
|
|
|
pnpmDeps = fetchPnpmDeps {
|
|
inherit (finalAttrs) pname version src;
|
|
inherit pnpm;
|
|
fetcherVersion = 3;
|
|
hash = "sha256-OP+FbBxSnyFdeKvhqhmdEr1htFSX+WoPj6Ti8Q+ab/Y=";
|
|
};
|
|
|
|
cargoHash = "sha256-JhsoIQZrU4GVcs/TCIug6y/84gODyEWl0Bl2jRNxL5Y=";
|
|
|
|
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;
|
|
};
|
|
})
|