Merge pull request #258429 from FliegendeWurst/wavebox-117.18-2

Artturi a3987f51 c1cfba58

Changed files
+33 -22
pkgs
applications
networking
instant-messengers
+28 -22
pkgs/applications/networking/instant-messengers/wavebox/default.nix
···
, gtk3
, gtk4
, libnotify
+
, copyDesktopItems
, makeDesktopItem
, makeWrapper
, mesa
···
, xorg
}:
-
let
-
version = "10.114.26-2";
-
desktopItem = makeDesktopItem rec {
-
name = "Wavebox";
-
exec = "wavebox";
-
icon = "wavebox";
-
desktopName = name;
-
genericName = name;
-
categories = [ "Network" "WebBrowser" ];
-
};
+
stdenv.mkDerivation rec {
+
pname = "wavebox";
+
version = "10.118.5-2";
-
tarball = "Wavebox_${version}.tar.gz";
-
-
in
-
stdenv.mkDerivation {
-
pname = "wavebox";
-
inherit version;
src = fetchurl {
-
url = "https://download.wavebox.app/stable/linux/tar/${tarball}";
-
sha256 = "1yk664zgahjg6n98n3kc9avcay0nqwcyq8wq231p7kvd79zazk0r";
+
url = "https://download.wavebox.app/stable/linux/tar/Wavebox_${version}.tar.gz";
+
sha256 = "sha256-TxMl8pdycCMY6NFi5MSLZg0p/+KmuAPQOm370bPMm/0=";
};
# don't remove runtime deps
dontPatchELF = true;
+
# ignore optional Qt 6 shim
+
autoPatchelfIgnoreMissingDeps = [ "libQt6Widgets.so.6" "libQt6Gui.so.6" "libQt6Core.so.6" ];
-
nativeBuildInputs = [ autoPatchelfHook makeWrapper qt5.wrapQtAppsHook ];
+
nativeBuildInputs = [ autoPatchelfHook makeWrapper qt5.wrapQtAppsHook copyDesktopItems ];
buildInputs = with xorg; [
libXdmcp
···
runtimeDependencies = [ (lib.getLib udev) libnotify gtk4 ];
+
desktopItems = [
+
(makeDesktopItem rec {
+
name = "Wavebox";
+
exec = "wavebox";
+
icon = "wavebox";
+
desktopName = name;
+
genericName = name;
+
categories = [ "Network" "WebBrowser" ];
+
})
+
];
+
installPhase = ''
+
runHook preInstall
+
mkdir -p $out/bin $out/opt/wavebox
cp -r * $out/opt/wavebox
-
# provide desktop item and icon
-
mkdir -p $out/share/applications $out/share/icons/hicolor/128x128/apps
-
ln -s ${desktopItem}/share/applications/* $out/share/applications
+
# provide icon for desktop item
+
mkdir -p $out/share/icons/hicolor/128x128/apps
ln -s $out/opt/wavebox/product_logo_128.png $out/share/icons/hicolor/128x128/apps/wavebox.png
+
+
runHook postInstall
'';
postFixup = ''
makeWrapper $out/opt/wavebox/wavebox-launcher $out/bin/wavebox \
--prefix PATH : ${xdg-utils}/bin
'';
+
+
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Wavebox messaging application";
+5
pkgs/applications/networking/instant-messengers/wavebox/update.sh
···
+
#!/usr/bin/env nix-shell
+
#!nix-shell -i bash -p nix-update curl jq
+
+
version=$(curl "https://download.wavebox.app/stable/linux/latest.json" | jq --raw-output '.["urls"]["tar"] | match("https://download.wavebox.app/stable/linux/tar/Wavebox_(.+).tar.gz").captures[0]["string"]')
+
nix-update wavebox --version "$version"