whalebird: init at 4.4.5 (#142885)

* whalebird: init at 4.4.5

* Update pkgs/applications/misc/whalebird/default.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
P 2021-11-01 14:17:46 -06:00 committed by GitHub
parent dd49b2dbf0
commit 6751e7428f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 65 additions and 0 deletions

View file

@ -0,0 +1,61 @@
{ lib, stdenv, fetchurl, dpkg, autoPatchelfHook, makeWrapper, electron
, nodePackages, alsa-lib, gtk3, libxshmfence, mesa, nss }:
stdenv.mkDerivation rec {
pname = "whalebird";
version = "4.4.5";
src = fetchurl {
url = "https://github.com/h3poteto/whalebird-desktop/releases/download/${version}/Whalebird-${version}-linux-x64.deb";
sha256 = "sha256-CIlj9Sc/hj2UMgQzfHA3iQYO6EPqcndqkNUCBecHq+E=";
};
nativeBuildInputs = [
dpkg
autoPatchelfHook
makeWrapper
nodePackages.asar
];
buildInputs = [ alsa-lib gtk3 libxshmfence mesa nss ];
dontConfigure = true;
unpackPhase = ''
dpkg-deb -x ${src} ./
'';
buildPhase = ''
runHook preBuild
# Necessary steps to find the tray icon
asar extract opt/Whalebird/resources/app.asar "$TMP/work"
substituteInPlace $TMP/work/dist/electron/main.js \
--replace "Mo,\"tray_icon.png\"" "\"$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
'';
installPhase = ''
runHook preInstall
mkdir $out
mv usr/share opt $out
substituteInPlace $out/share/applications/whalebird.desktop \
--replace '/opt/Whalebird' $out/bin
makeWrapper ${electron}/bin/electron $out/bin/whalebird \
--add-flags $out/opt/Whalebird/resources/app.asar
runHook postInstall
'';
meta = with lib; {
description = "Electron based Mastodon, Pleroma and Misskey client for Windows, Mac and Linux";
homepage = "https://whalebird.social";
license = licenses.mit;
maintainers = with maintainers; [ wolfangaukang ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -28838,6 +28838,10 @@ with pkgs;
weston = callPackage ../applications/window-managers/weston { pipewire = pipewire_0_2; };
whalebird = callPackage ../applications/misc/whalebird {
electron = electron_12;
};
wio = callPackage ../applications/window-managers/wio { };
whitebox-tools = callPackage ../applications/gis/whitebox-tools {