Merge pull request #237122 from Weathercold/whalebird-5.0.6

whalebird: 4.7.4 -> 5.0.7
This commit is contained in:
Pol Dellaiera 2023-06-15 16:44:47 +02:00 committed by GitHub
commit fa6c140ffd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 11 deletions

View file

@ -17133,6 +17133,16 @@
github = "wdavidw";
githubId = 46896;
};
weathercold = {
name = "Weathercold";
email = "weathercold.scr@gmail.com";
matrix = "@weathercold:matrix.org";
github = "Weathercold";
githubId = 49368953;
keys = [{
fingerprint = "D20F C904 A145 8B28 53D8 FBA0 0422 0096 01E4 87FC";
}];
};
wegank = {
name = "Weijia Wang";
email = "contact@weijia.wang";

View file

@ -1,22 +1,24 @@
{ lib, stdenv, fetchurl, autoPatchelfHook, makeDesktopItem, copyDesktopItems, makeWrapper, electron
, nodePackages, alsa-lib, gtk3, libdbusmenu, libxshmfence, mesa, nss }:
{ lib, stdenv, fetchurl
, autoPatchelfHook, makeDesktopItem, copyDesktopItems, makeWrapper, gnugrep, nodePackages
, electron, python3, alsa-lib, gtk3, libdbusmenu, libxshmfence, mesa, nss
}:
stdenv.mkDerivation rec {
pname = "whalebird";
version = "4.7.4";
version = "5.0.7";
src = let
downloads = "https://github.com/h3poteto/whalebird-desktop/releases/download/${version}";
downloads = "https://github.com/h3poteto/whalebird-desktop/releases/download/v${version}";
in
if stdenv.system == "x86_64-linux" then
fetchurl {
url = downloads + "/Whalebird-${version}-linux-x64.tar.bz2";
sha256 = "sha256-jRtlnKlrh6If9wy3FqVBtctQO3rZJRwceUWAPmieT4A=";
hash = "sha256-eufP038REwF2VwAxxI8R0S3fE8oJ+SX/CES5ozuut2w=";
}
else if stdenv.system == "aarch64-linux" then
fetchurl {
url = downloads + "/Whalebird-${version}-linux-arm64.tar.bz2";
sha256 = "sha256-gWCBH2zfhJdJ3XUAxvZ0+gBHye5uYCUgX1BDEoaruxY=";
hash = "sha256-U0xVTUUm6wsRxYc1w4vfNtVE6o8dNzXTSi+IX4mgDEE=";
}
else
throw "Whalebird is not supported for ${stdenv.system}";
@ -25,6 +27,7 @@ stdenv.mkDerivation rec {
autoPatchelfHook
makeWrapper
copyDesktopItems
gnugrep
nodePackages.asar
];
@ -52,9 +55,16 @@ stdenv.mkDerivation rec {
runHook preBuild
# 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"
substituteInPlace $TMP/work/dist/electron/main.js \
--replace "qt,\"tray_icon.png\"" "\"$out/opt/Whalebird/resources/build/icons/tray_icon.png\""
substituteInPlace "$TMP/work/dist/electron/main.js" \
--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
runHook postBuild
@ -83,8 +93,8 @@ stdenv.mkDerivation rec {
description = "Electron based Mastodon, Pleroma and Misskey client for Windows, Mac and Linux";
homepage = "https://whalebird.social";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.mit;
maintainers = with maintainers; [ wolfangaukang colinsane ];
license = licenses.gpl3Only;
maintainers = with maintainers; [ wolfangaukang colinsane weathercold ];
platforms = [ "x86_64-linux" "aarch64-linux" ];
};
}

View file

@ -35434,7 +35434,7 @@ with pkgs;
wgnord = callPackage ../applications/networking/wgnord/default.nix { };
whalebird = callPackage ../applications/misc/whalebird {
electron = electron_19;
electron = electron_21;
};
windowlab = callPackage ../applications/window-managers/windowlab { };