bluebubbles: init at 1.15.4 (#404147)

This commit is contained in:
Matteo Pacini
2025-05-05 22:29:44 +01:00
committed by GitHub
6 changed files with 4580 additions and 0 deletions
+6
View File
@@ -27101,6 +27101,12 @@
name = "Zexin Yuan";
keys = [ { fingerprint = "FE16 B281 90EF 6C3F F661 6441 C2DD 1916 FE47 1BE2"; } ];
};
zacharyweiss = {
name = "Zachary Weiss";
email = "me@zachary.ws";
github = "zacharyweiss";
githubId = 20050953;
};
zachcoyle = {
email = "zach.coyle@gmail.com";
github = "zachcoyle";
+72
View File
@@ -0,0 +1,72 @@
{
lib,
flutter327,
fetchFromGitHub,
autoPatchelfHook,
webkitgtk_4_1,
libnotify,
libayatana-appindicator,
jdk,
mpv,
}:
flutter327.buildFlutterApplication rec {
pname = "bluebubbles";
version = "1.15.4";
src = fetchFromGitHub {
owner = "BlueBubblesApp";
repo = "bluebubbles-app";
tag = "v${version}+73-desktop";
hash = "sha256-+JCj4EuwFbzE4u+7iJ+v9FQuLVt1tozwBufw+eL5usk=";
};
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
desktop_webview_auth = "sha256-n3lvYFUzm/1sCwQBJ3Ovup4Mq7lqGJ17ktk3TJrHhKE=";
disable_battery_optimization = "sha256-IsfclmbdLvju+0VWElFz9brdVntRESFB+PF8UPJBL2E=";
firebase_dart = "sha256-jq4Y5ApGPrXcLN3gwC9NuGN/EQkl5u64iMzL8KG02Sc=";
gesture_x_detector = "sha256-H3OJxDhESWwnpRky9jS9RIBiZ7gSqWQ/j0x/1VvRb5M=";
local_notifier = "sha256-0vajd2XNGpV9aqywbCUvDC2SLjwxh1LmshTa5yttQUI=";
permission_handler_windows = "sha256-9h0wEOgY6gtqaSyH9x2fbvH8Y0EfoVs/qNqwwI5d18k=";
video_thumbnail = "sha256-7IbKg6bBA5D8ODwMNwJqIohTCbAox56TMgoI07CbrPw=";
};
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
webkitgtk_4_1
libnotify
libayatana-appindicator
jdk
mpv
];
# distributed in release tarballs under `data/flutter_assets/.env`, necessary for build and runtime
preBuild = ''
echo 'TENOR_API_KEY=AIzaSyAQwUlgo8sF5FBuIiampkfzaGgVPMglcGk' > .env
'';
postInstall = ''
sed -i 's#Icon=.*/bluebubbles.png#Icon=bluebubbles#g' snap/gui/bluebubbles.desktop
install -Dm0644 snap/gui/bluebubbles.desktop $out/share/applications/bluebubbles.desktop
install -Dm0644 snap/gui/bluebubbles.png $out/share/pixmaps/bluebubbles.png
'';
extraWrapProgramArgs = ''
--prefix LD_LIBRARY_PATH : $out/app/bluebubbles/lib
'';
meta = {
description = "Cross-platform iMessage client";
homepage = "https://github.com/BlueBubblesApp/bluebubbles-app";
mainProgram = "bluebubbles";
license = lib.licenses.asl20;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
emaryn
zacharyweiss
];
};
}
File diff suppressed because it is too large Load Diff
@@ -12,6 +12,7 @@
media_kit_libs_linux = callPackage ./media_kit_libs_linux { };
metadata_god = callPackage ./metadata_god { };
olm = callPackage ./olm { };
objectbox_flutter_libs = callPackage ./objectbox_flutter_libs { };
pdfrx = callPackage ./pdfrx { };
printing = callPackage ./printing { };
rhttp = callPackage ./rhttp { };
@@ -0,0 +1,46 @@
--- old/linux/CMakeLists.txt
+++ new/linux/CMakeLists.txt
@@ -41,35 +41,6 @@
target_link_libraries(${PLUGIN_NAME} PRIVATE flutter)
target_link_libraries(${PLUGIN_NAME} PRIVATE PkgConfig::GTK)
-# ----------------------------------------------------------------------
-# Download and add objectbox-c prebuilt library.
-
-set(OBJECTBOX_VERSION 4.0.2)
-
-set(OBJECTBOX_ARCH ${CMAKE_SYSTEM_PROCESSOR})
-if (${OBJECTBOX_ARCH} MATCHES "x86_64")
- set(OBJECTBOX_ARCH x64)
-elseif (${OBJECTBOX_ARCH} MATCHES "^arm64" OR ${OBJECTBOX_ARCH} MATCHES "^armv8")
- set(OBJECTBOX_ARCH aarch64)
-elseif (${OBJECTBOX_ARCH} MATCHES "^armv7")
- set(OBJECTBOX_ARCH armv7hf)
-elseif (${OBJECTBOX_ARCH} MATCHES "^arm")
- set(OBJECTBOX_ARCH armv6hf)
-endif ()
-
-include(FetchContent)
-FetchContent_Declare(
- objectbox-download
- URL https://github.com/objectbox/objectbox-c/releases/download/v${OBJECTBOX_VERSION}/objectbox-linux-${OBJECTBOX_ARCH}.tar.gz
-)
-
-FetchContent_GetProperties(objectbox-download)
-if(NOT objectbox-download_POPULATED)
- FetchContent_Populate(objectbox-download)
-endif()
-
-# ----------------------------------------------------------------------
-
# List of absolute paths to libraries that should be bundled with the plugin.
# This list could contain prebuilt libraries, or libraries created by an
# external build triggered from this build file.
@@ -77,6 +48,6 @@
# Note: do not link the ObjectBox C library; the Dart library looks for it in a lib subfolder
# where flutter build puts it when added below.
set(objectbox_flutter_libs_bundled_libraries
- "${objectbox-download_SOURCE_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ "@OBJECTBOX_SHARED_LIBRARY@"
PARENT_SCOPE
)
@@ -0,0 +1,50 @@
{
lib,
stdenv,
fetchzip,
replaceVars,
}:
{ version, src, ... }:
let
selectSystem =
attrs:
attrs.${stdenv.hostPlatform.system}
or (throw "objectbox_flutter_libs: ${stdenv.hostPlatform.system} is not supported");
arch = selectSystem {
x86_64-linux = "x64";
aarch64-linux = "aarch64";
};
objectbox-sync = fetchzip {
url = "https://github.com/objectbox/objectbox-c/releases/download/v4.0.2/objectbox-sync-linux-${arch}.tar.gz";
hash = selectSystem {
x86_64-linux = "sha256-VXTuCYg0ZItK+lAs7xkNlxO0rUPnbRZOP5RAXbcRyjM=";
aarch64-linux = "sha256-kNlrBRR/qDEhdU34f4eDQLgYkYAIfFC8/of4rgL+m6k=";
};
stripRoot = false;
};
in
stdenv.mkDerivation {
pname = "objectbox_flutter_libs";
inherit version src;
inherit (src) passthru;
patches = [
(replaceVars ./CMakeLists.patch {
OBJECTBOX_SHARED_LIBRARY = "${objectbox-sync}/lib/libobjectbox.so";
})
];
installPhase = ''
runHook preInstall
cp -r . $out
runHook postInstall
'';
meta.sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
}