mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
parent
b5cfb921f8
commit
f81e9b1680
1 changed files with 109 additions and 0 deletions
109
pkgs/by-name/de/deltachat-tauri/package.nix
Normal file
109
pkgs/by-name/de/deltachat-tauri/package.nix
Normal 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;
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue