mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 16:53:21 +00:00
fluffychat-web: init at 1.14.1
This commit is contained in:
parent
f51a0b053d
commit
62029c27a1
@ -1,4 +1,5 @@
|
|||||||
{ lib
|
{ lib
|
||||||
|
, fetchzip
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, imagemagick
|
, imagemagick
|
||||||
, mesa
|
, mesa
|
||||||
@ -7,13 +8,15 @@
|
|||||||
, pulseaudio
|
, pulseaudio
|
||||||
, makeDesktopItem
|
, makeDesktopItem
|
||||||
, gnome
|
, gnome
|
||||||
|
|
||||||
|
, flutterHostPlatform ? "linux"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
libwebrtcRpath = lib.makeLibraryPath [ mesa libdrm ];
|
libwebrtcRpath = lib.makeLibraryPath [ mesa libdrm ];
|
||||||
in
|
in
|
||||||
flutter313.buildFlutterApplication rec {
|
flutter313.buildFlutterApplication (rec {
|
||||||
pname = "fluffychat";
|
pname = "fluffychat-${flutterHostPlatform}";
|
||||||
version = "1.14.1";
|
version = "1.14.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -30,6 +33,25 @@ flutter313.buildFlutterApplication rec {
|
|||||||
wakelock_windows = "sha256-Dfwe3dSScD/6kvkP67notcbb+EgTQ3kEYcH7wpra2dI=";
|
wakelock_windows = "sha256-Dfwe3dSScD/6kvkP67notcbb+EgTQ3kEYcH7wpra2dI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inherit flutterHostPlatform;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Chat with your friends (matrix client)";
|
||||||
|
homepage = "https://fluffychat.im/";
|
||||||
|
license = licenses.agpl3Plus;
|
||||||
|
maintainers = with maintainers; [ mkg20001 gilice ];
|
||||||
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
|
sourceProvenance = [ sourceTypes.fromSource ];
|
||||||
|
};
|
||||||
|
} // lib.optionalAttrs (flutterHostPlatform == "linux") {
|
||||||
|
nativeBuildInputs = [ imagemagick ];
|
||||||
|
|
||||||
|
runtimeDependencies = [ pulseaudio ];
|
||||||
|
|
||||||
|
extraWrapProgramArgs = "--prefix PATH : ${gnome.zenity}/bin";
|
||||||
|
|
||||||
|
env.NIX_LDFLAGS = "-rpath-link ${libwebrtcRpath}";
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
name = "Fluffychat";
|
name = "Fluffychat";
|
||||||
exec = "@out@/bin/fluffychat";
|
exec = "@out@/bin/fluffychat";
|
||||||
@ -39,9 +61,6 @@ flutter313.buildFlutterApplication rec {
|
|||||||
categories = [ "Chat" "Network" "InstantMessaging" ];
|
categories = [ "Chat" "Network" "InstantMessaging" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ imagemagick ];
|
|
||||||
runtimeDependencies = [ pulseaudio ];
|
|
||||||
extraWrapProgramArgs = "--prefix PATH : ${gnome.zenity}/bin";
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
FAV=$out/app/data/flutter_assets/assets/favicon.png
|
FAV=$out/app/data/flutter_assets/assets/favicon.png
|
||||||
ICO=$out/share/icons
|
ICO=$out/share/icons
|
||||||
@ -59,15 +78,21 @@ flutter313.buildFlutterApplication rec {
|
|||||||
|
|
||||||
patchelf --add-rpath ${libwebrtcRpath} $out/app/lib/libwebrtc.so
|
patchelf --add-rpath ${libwebrtcRpath} $out/app/lib/libwebrtc.so
|
||||||
'';
|
'';
|
||||||
|
} // lib.optionalAttrs (flutterHostPlatform == "web") {
|
||||||
env.NIX_LDFLAGS = "-rpath-link ${libwebrtcRpath}";
|
prePatch =
|
||||||
|
# https://github.com/krille-chan/fluffychat/blob/v1.17.1/scripts/prepare-web.sh
|
||||||
meta = with lib; {
|
let
|
||||||
description = "Chat with your friends (matrix client)";
|
# Use Olm 1.3.2, the oldest version, for FluffyChat 1.14.1 which depends on olm_flutter 1.2.0.
|
||||||
homepage = "https://fluffychat.im/";
|
# In the future, this should be changed to use self.pubspecLock.dependencyVersions.flutter_olm as the script does.
|
||||||
license = licenses.agpl3Plus;
|
olmVersion = "1.3.2";
|
||||||
maintainers = with maintainers; [ mkg20001 gilice ];
|
olmJs = fetchzip {
|
||||||
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
url = "https://github.com/famedly/olm/releases/download/v${olmVersion}/olm.zip";
|
||||||
sourceProvenance = [ sourceTypes.fromSource ];
|
stripRoot = false;
|
||||||
|
hash = "sha256-Vl3Cp2OaYzM5CPOOtTHtUb1W48VXePzOV6FeiIzyD1Y=";
|
||||||
};
|
};
|
||||||
}
|
in
|
||||||
|
''
|
||||||
|
rm -r assets/js/package
|
||||||
|
cp -r '${olmJs}/javascript' assets/js/package
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
@ -3850,6 +3850,8 @@ with pkgs;
|
|||||||
|
|
||||||
fluffychat = callPackage ../applications/networking/instant-messengers/fluffychat { };
|
fluffychat = callPackage ../applications/networking/instant-messengers/fluffychat { };
|
||||||
|
|
||||||
|
fluffychat-web = fluffychat.override { flutterHostPlatform = "web"; };
|
||||||
|
|
||||||
fxlinuxprintutil = callPackage ../tools/misc/fxlinuxprintutil { };
|
fxlinuxprintutil = callPackage ../tools/misc/fxlinuxprintutil { };
|
||||||
|
|
||||||
gbl = callPackage ../tools/archivers/gbl {
|
gbl = callPackage ../tools/archivers/gbl {
|
||||||
|
Loading…
Reference in New Issue
Block a user