fluffychat: add .desktop
This commit is contained in:
parent
0bd82b7767
commit
c625e715f8
@ -2,6 +2,8 @@
|
|||||||
, fetchFromGitLab
|
, fetchFromGitLab
|
||||||
, flutter
|
, flutter
|
||||||
, olm
|
, olm
|
||||||
|
, imagemagick
|
||||||
|
, makeDesktopItem
|
||||||
}:
|
}:
|
||||||
|
|
||||||
flutter.mkFlutterApp rec {
|
flutter.mkFlutterApp rec {
|
||||||
@ -17,10 +19,23 @@ flutter.mkFlutterApp rec {
|
|||||||
hash = "sha256-PJH3jMQc6u9R6Snn+9rNN8t+8kt6l3Xt7zKPbpqj13E=";
|
hash = "sha256-PJH3jMQc6u9R6Snn+9rNN8t+8kt6l3Xt7zKPbpqj13E=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
desktopItem = makeDesktopItem {
|
||||||
|
name = "Fluffychat";
|
||||||
|
exec = "@out@/bin/fluffychat";
|
||||||
|
icon = "fluffychat";
|
||||||
|
desktopName = "Fluffychat";
|
||||||
|
genericName = "Chat with your friends (matrix client)";
|
||||||
|
categories = "Chat;Network;InstantMessaging;";
|
||||||
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
olm
|
olm
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
imagemagick
|
||||||
|
];
|
||||||
|
|
||||||
flutterExtraFetchCommands = ''
|
flutterExtraFetchCommands = ''
|
||||||
M=$(echo $TMP/.pub-cache/hosted/pub.dartlang.org/matrix-*)
|
M=$(echo $TMP/.pub-cache/hosted/pub.dartlang.org/matrix-*)
|
||||||
sed -i $M/scripts/prepare.sh \
|
sed -i $M/scripts/prepare.sh \
|
||||||
@ -32,6 +47,24 @@ flutter.mkFlutterApp rec {
|
|||||||
popd
|
popd
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
FAV=$out/app/data/flutter_assets/assets/favicon.png
|
||||||
|
ICO=$out/share/icons
|
||||||
|
|
||||||
|
install -D $FAV $ICO/fluffychat.png
|
||||||
|
mkdir $out/share/applications
|
||||||
|
cp $desktopItem/share/applications/*.desktop $out/share/applications
|
||||||
|
|
||||||
|
for s in 24 32 42 64 128 256 512; do
|
||||||
|
D=$ICO/hicolor/''${s}x''${s}/apps
|
||||||
|
mkdir -p $D
|
||||||
|
convert $FAV -resize ''${s}x''${s} $D/fluffychat.png
|
||||||
|
done
|
||||||
|
|
||||||
|
substituteInPlace $out/share/applications/*.desktop \
|
||||||
|
--subst-var out
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Chat with your friends (matrix client)";
|
description = "Chat with your friends (matrix client)";
|
||||||
homepage = "https://fluffychat.im/";
|
homepage = "https://fluffychat.im/";
|
||||||
|
Loading…
Reference in New Issue
Block a user