forked from mirrors/nixpkgs
whalebird: 4.7.4 -> 5.0.7
changelog: <https://github.com/h3poteto/whalebird-desktop/releases> notable changes: - Add hide-to-tray on start option (3942) - Re-implement layout and sidebar (4037) - Show reply target message on compose (4098) - Show character limit in compose (4099) - Show quote target message on compose (4100) - Add validation for compose (4121) - Auto-complete in compose (4139) - Add shortcut key for post (4269) - !!! Update electron version to 21.4.4 (4304) - !!! Change license to GPL (4363) - Add scroll bar if there are many hashtags or lists (4421) - Add shortuct for reloading with CMD+R (4422) - Tons of dependency bumps and fixes
This commit is contained in:
parent
9c8632460d
commit
d2c4d21c2f
|
@ -1,22 +1,24 @@
|
||||||
{ lib, stdenv, fetchurl, autoPatchelfHook, makeDesktopItem, copyDesktopItems, makeWrapper, electron
|
{ lib, stdenv, fetchurl
|
||||||
, nodePackages, alsa-lib, gtk3, libdbusmenu, libxshmfence, mesa, nss }:
|
, autoPatchelfHook, makeDesktopItem, copyDesktopItems, makeWrapper, gnugrep, nodePackages
|
||||||
|
, electron, python3, alsa-lib, gtk3, libdbusmenu, libxshmfence, mesa, nss
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "whalebird";
|
pname = "whalebird";
|
||||||
version = "4.7.4";
|
version = "5.0.7";
|
||||||
|
|
||||||
src = let
|
src = let
|
||||||
downloads = "https://github.com/h3poteto/whalebird-desktop/releases/download/${version}";
|
downloads = "https://github.com/h3poteto/whalebird-desktop/releases/download/v${version}";
|
||||||
in
|
in
|
||||||
if stdenv.system == "x86_64-linux" then
|
if stdenv.system == "x86_64-linux" then
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = downloads + "/Whalebird-${version}-linux-x64.tar.bz2";
|
url = downloads + "/Whalebird-${version}-linux-x64.tar.bz2";
|
||||||
sha256 = "sha256-jRtlnKlrh6If9wy3FqVBtctQO3rZJRwceUWAPmieT4A=";
|
hash = "sha256-eufP038REwF2VwAxxI8R0S3fE8oJ+SX/CES5ozuut2w=";
|
||||||
}
|
}
|
||||||
else if stdenv.system == "aarch64-linux" then
|
else if stdenv.system == "aarch64-linux" then
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = downloads + "/Whalebird-${version}-linux-arm64.tar.bz2";
|
url = downloads + "/Whalebird-${version}-linux-arm64.tar.bz2";
|
||||||
sha256 = "sha256-gWCBH2zfhJdJ3XUAxvZ0+gBHye5uYCUgX1BDEoaruxY=";
|
hash = "sha256-U0xVTUUm6wsRxYc1w4vfNtVE6o8dNzXTSi+IX4mgDEE=";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw "Whalebird is not supported for ${stdenv.system}";
|
throw "Whalebird is not supported for ${stdenv.system}";
|
||||||
|
@ -25,6 +27,7 @@ stdenv.mkDerivation rec {
|
||||||
autoPatchelfHook
|
autoPatchelfHook
|
||||||
makeWrapper
|
makeWrapper
|
||||||
copyDesktopItems
|
copyDesktopItems
|
||||||
|
gnugrep
|
||||||
nodePackages.asar
|
nodePackages.asar
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -52,9 +55,16 @@ stdenv.mkDerivation rec {
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
# Necessary steps to find the tray icon
|
# Necessary steps to find the tray icon
|
||||||
|
# For aarch64-linux, we need to overwrite this symlink first as it points to
|
||||||
|
# /usr/bin/python3
|
||||||
|
if [ "${stdenv.system}" = "aarch64-linux" ]
|
||||||
|
then ln -sf ${python3}/bin/python3 \
|
||||||
|
opt/Whalebird/resources/app.asar.unpacked/node_modules/better-sqlite3/build/node_gyp_bins/python3
|
||||||
|
fi
|
||||||
asar extract opt/Whalebird/resources/app.asar "$TMP/work"
|
asar extract opt/Whalebird/resources/app.asar "$TMP/work"
|
||||||
substituteInPlace $TMP/work/dist/electron/main.js \
|
substituteInPlace "$TMP/work/dist/electron/main.js" \
|
||||||
--replace "qt,\"tray_icon.png\"" "\"$out/opt/Whalebird/resources/build/icons/tray_icon.png\""
|
--replace "$(grep -oE '.{2},"tray_icon.png"' "$TMP/work/dist/electron/main.js")" \
|
||||||
|
"\"$out/opt/Whalebird/resources/build/icons/tray_icon.png\""
|
||||||
asar pack --unpack='{*.node,*.ftz,rect-overlay}' "$TMP/work" opt/Whalebird/resources/app.asar
|
asar pack --unpack='{*.node,*.ftz,rect-overlay}' "$TMP/work" opt/Whalebird/resources/app.asar
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
|
@ -83,8 +93,8 @@ stdenv.mkDerivation rec {
|
||||||
description = "Electron based Mastodon, Pleroma and Misskey client for Windows, Mac and Linux";
|
description = "Electron based Mastodon, Pleroma and Misskey client for Windows, Mac and Linux";
|
||||||
homepage = "https://whalebird.social";
|
homepage = "https://whalebird.social";
|
||||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||||
license = licenses.mit;
|
license = licenses.gpl3Only;
|
||||||
maintainers = with maintainers; [ wolfangaukang colinsane ];
|
maintainers = with maintainers; [ wolfangaukang colinsane weathercold ];
|
||||||
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -35360,7 +35360,7 @@ with pkgs;
|
||||||
wgnord = callPackage ../applications/networking/wgnord/default.nix { };
|
wgnord = callPackage ../applications/networking/wgnord/default.nix { };
|
||||||
|
|
||||||
whalebird = callPackage ../applications/misc/whalebird {
|
whalebird = callPackage ../applications/misc/whalebird {
|
||||||
electron = electron_19;
|
electron = electron_21;
|
||||||
};
|
};
|
||||||
|
|
||||||
windowlab = callPackage ../applications/window-managers/windowlab { };
|
windowlab = callPackage ../applications/window-managers/windowlab { };
|
||||||
|
|
Loading…
Reference in a new issue