wavebox: 10.124.17-2 -> 10.127.10-2 (#324822)
* wavebox: 10.124.17-2 -> 10.126.14-2 * wavebox: apply suggestions from code review Co-authored-by: Sandro <sandro.jaeckel@gmail.com> * wavebox: bump version to 10.127.10-2 * wavebox: complete the removal of $appname variable * wavebox: use callPackage from all-packages.nix; wavebox is not a Qt5 app * wavebox: replace addOpenGLRunpath with addDriverRunpath * wavebox: update comment about libvaSupport * wavebox: format with nixfmt-rfc-style --------- Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
4adf136810
commit
a18c10b8c1
@ -1,94 +1,247 @@
|
|||||||
{ alsa-lib
|
{
|
||||||
, autoPatchelfHook
|
lib,
|
||||||
, fetchurl
|
stdenv,
|
||||||
, gtk3
|
patchelf,
|
||||||
, gtk4
|
makeWrapper,
|
||||||
, libnotify
|
fetchurl,
|
||||||
, copyDesktopItems
|
writeScript,
|
||||||
, makeDesktopItem
|
|
||||||
, makeWrapper
|
# Libraries
|
||||||
, mesa
|
glib,
|
||||||
, nss
|
fontconfig,
|
||||||
, lib
|
freetype,
|
||||||
, libdrm
|
pango,
|
||||||
, qt5
|
cairo,
|
||||||
, stdenv
|
libX11,
|
||||||
, udev
|
libXi,
|
||||||
, xdg-utils
|
atk,
|
||||||
, xorg
|
nss,
|
||||||
|
nspr,
|
||||||
|
libXcursor,
|
||||||
|
libXext,
|
||||||
|
libXfixes,
|
||||||
|
libXrender,
|
||||||
|
libXScrnSaver,
|
||||||
|
libXcomposite,
|
||||||
|
libxcb,
|
||||||
|
alsa-lib,
|
||||||
|
libXdamage,
|
||||||
|
libXtst,
|
||||||
|
libXrandr,
|
||||||
|
libxshmfence,
|
||||||
|
expat,
|
||||||
|
cups,
|
||||||
|
dbus,
|
||||||
|
gtk3,
|
||||||
|
gtk4,
|
||||||
|
gdk-pixbuf,
|
||||||
|
gcc-unwrapped,
|
||||||
|
at-spi2-atk,
|
||||||
|
at-spi2-core,
|
||||||
|
libkrb5,
|
||||||
|
libdrm,
|
||||||
|
libglvnd,
|
||||||
|
mesa,
|
||||||
|
libxkbcommon,
|
||||||
|
pipewire,
|
||||||
|
wayland,
|
||||||
|
|
||||||
|
coreutils,
|
||||||
|
|
||||||
|
# command line arguments which are always set e.g "--disable-gpu"
|
||||||
|
commandLineArgs ? "",
|
||||||
|
|
||||||
|
systemd,
|
||||||
|
|
||||||
|
# Loaded at runtime.
|
||||||
|
libexif,
|
||||||
|
pciutils,
|
||||||
|
|
||||||
|
liberation_ttf,
|
||||||
|
curl,
|
||||||
|
util-linux,
|
||||||
|
xdg-utils,
|
||||||
|
wget,
|
||||||
|
flac,
|
||||||
|
harfbuzz,
|
||||||
|
icu,
|
||||||
|
libpng,
|
||||||
|
libopus,
|
||||||
|
snappy,
|
||||||
|
speechd,
|
||||||
|
bzip2,
|
||||||
|
libcap,
|
||||||
|
|
||||||
|
# Necessary for USB audio devices.
|
||||||
|
pulseSupport ? true,
|
||||||
|
libpulseaudio,
|
||||||
|
|
||||||
|
gsettings-desktop-schemas,
|
||||||
|
|
||||||
|
# Allow video acceleration via VA-API to be disabled on systems where is doesn't
|
||||||
|
# work reliably (--enable-features=VaapiVideoDecoder)
|
||||||
|
libvaSupport ? true,
|
||||||
|
libva,
|
||||||
|
|
||||||
|
# For Vulkan support (--enable-features=Vulkan)
|
||||||
|
addDriverRunpath,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
|
opusWithCustomModes = libopus.override { withCustomModes = true; };
|
||||||
|
|
||||||
|
deps =
|
||||||
|
[
|
||||||
|
glib
|
||||||
|
fontconfig
|
||||||
|
freetype
|
||||||
|
pango
|
||||||
|
cairo
|
||||||
|
libX11
|
||||||
|
libXi
|
||||||
|
atk
|
||||||
|
nss
|
||||||
|
nspr
|
||||||
|
libXcursor
|
||||||
|
libXext
|
||||||
|
libXfixes
|
||||||
|
libXrender
|
||||||
|
libXScrnSaver
|
||||||
|
libXcomposite
|
||||||
|
libxcb
|
||||||
|
alsa-lib
|
||||||
|
libXdamage
|
||||||
|
libXtst
|
||||||
|
libXrandr
|
||||||
|
libxshmfence
|
||||||
|
expat
|
||||||
|
cups
|
||||||
|
dbus
|
||||||
|
gdk-pixbuf
|
||||||
|
gcc-unwrapped.lib
|
||||||
|
systemd
|
||||||
|
libexif
|
||||||
|
pciutils
|
||||||
|
liberation_ttf
|
||||||
|
curl
|
||||||
|
util-linux
|
||||||
|
wget
|
||||||
|
flac
|
||||||
|
harfbuzz
|
||||||
|
icu
|
||||||
|
libpng
|
||||||
|
opusWithCustomModes
|
||||||
|
snappy
|
||||||
|
speechd
|
||||||
|
bzip2
|
||||||
|
libcap
|
||||||
|
at-spi2-atk
|
||||||
|
at-spi2-core
|
||||||
|
libkrb5
|
||||||
|
libdrm
|
||||||
|
libglvnd
|
||||||
|
mesa
|
||||||
|
coreutils
|
||||||
|
libxkbcommon
|
||||||
|
pipewire
|
||||||
|
wayland
|
||||||
|
]
|
||||||
|
++ lib.optional pulseSupport libpulseaudio
|
||||||
|
++ lib.optional libvaSupport libva
|
||||||
|
++ [
|
||||||
|
gtk3
|
||||||
|
gtk4
|
||||||
|
];
|
||||||
|
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "wavebox";
|
pname = "wavebox";
|
||||||
version = "10.124.17-2";
|
version = "10.127.10-2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.wavebox.app/stable/linux/tar/Wavebox_${version}.tar.gz";
|
url = "https://download.wavebox.app/stable/linux/deb/amd64/wavebox_${finalAttrs.version}_amd64.deb";
|
||||||
sha256 = "sha256-RS1/zs/rFWsj29BrT8Mb2IXgy9brBsQypxfvnd7pKl0=";
|
hash = "sha256-x095V2UhRJfPmmG+4/i7I9AnCU4WVrw0b71nEu73uew=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# don't remove runtime deps
|
nativeBuildInputs = [
|
||||||
dontPatchELF = true;
|
patchelf
|
||||||
# ignore optional Qt 6 shim
|
makeWrapper
|
||||||
autoPatchelfIgnoreMissingDeps = [ "libQt6Widgets.so.6" "libQt6Gui.so.6" "libQt6Core.so.6" ];
|
];
|
||||||
|
buildInputs = [
|
||||||
nativeBuildInputs = [ autoPatchelfHook makeWrapper qt5.wrapQtAppsHook copyDesktopItems ];
|
gsettings-desktop-schemas # needed for GSETTINGS_SCHEMAS_PATH
|
||||||
|
glib
|
||||||
buildInputs = with xorg; [
|
|
||||||
libXdmcp
|
|
||||||
libXScrnSaver
|
|
||||||
libXtst
|
|
||||||
libxshmfence
|
|
||||||
libXdamage
|
|
||||||
] ++ [
|
|
||||||
alsa-lib
|
|
||||||
gtk3
|
gtk3
|
||||||
nss
|
|
||||||
libdrm
|
|
||||||
mesa
|
|
||||||
gtk4
|
|
||||||
qt5.qtbase
|
|
||||||
];
|
];
|
||||||
|
|
||||||
runtimeDependencies = [ (lib.getLib udev) libnotify gtk4 ];
|
unpackPhase = ''
|
||||||
|
ar x $src
|
||||||
|
tar xf data.tar.xz
|
||||||
|
'';
|
||||||
|
|
||||||
desktopItems = [
|
rpath = lib.makeLibraryPath deps + ":" + lib.makeSearchPathOutput "lib" "lib64" deps;
|
||||||
(makeDesktopItem rec {
|
|
||||||
name = "Wavebox";
|
|
||||||
exec = "wavebox";
|
|
||||||
icon = "wavebox";
|
|
||||||
desktopName = name;
|
|
||||||
genericName = name;
|
|
||||||
categories = [ "Network" "WebBrowser" ];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/bin $out/opt/wavebox
|
exe=$out/bin/wavebox
|
||||||
cp -r * $out/opt/wavebox
|
|
||||||
|
|
||||||
# provide icon for desktop item
|
mkdir -p $out/bin $out/share
|
||||||
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
|
cp -a opt/* $out/share
|
||||||
|
cp -a usr/share/* $out/share
|
||||||
|
|
||||||
|
|
||||||
|
substituteInPlace $out/share/wavebox.io/wavebox/wavebox-launcher \
|
||||||
|
--replace-fail 'CHROME_WRAPPER' 'WRAPPER'
|
||||||
|
substituteInPlace $out/share/applications/wavebox.desktop \
|
||||||
|
--replace-fail /opt/wavebox.io/wavebox/wavebox-launcher $exe
|
||||||
|
substituteInPlace $out/share/menu/wavebox.menu \
|
||||||
|
--replace-fail /opt $out/share \
|
||||||
|
--replace-fail $out/share/wavebox.io/wavebox/wavebox $exe
|
||||||
|
|
||||||
|
for icon_file in $out/share/wavebox.io/wavebox/product_logo_[0-9]*.png; do
|
||||||
|
num_and_suffix="''${icon_file##*logo_}"
|
||||||
|
icon_size="''${num_and_suffix%.*}"
|
||||||
|
logo_output_prefix="$out/share/icons/hicolor"
|
||||||
|
logo_output_path="$logo_output_prefix/''${icon_size}x''${icon_size}/apps"
|
||||||
|
mkdir -p "$logo_output_path"
|
||||||
|
mv "$icon_file" "$logo_output_path/wavebox.png"
|
||||||
|
done
|
||||||
|
|
||||||
|
makeWrapper "$out/share/wavebox.io/wavebox/wavebox" "$exe" \
|
||||||
|
--prefix LD_LIBRARY_PATH : "$rpath" \
|
||||||
|
--prefix PATH : "${lib.makeBinPath deps}" \
|
||||||
|
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
|
||||||
|
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH:${addDriverRunpath.driverLink}/share" \
|
||||||
|
--set CHROME_WRAPPER "wavebox" \
|
||||||
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
|
||||||
|
--add-flags ${lib.escapeShellArg commandLineArgs}
|
||||||
|
|
||||||
|
for elf in $out/share/wavebox.io/wavebox/{wavebox,chrome-sandbox,chrome_crashpad_handler}; do
|
||||||
|
patchelf --set-rpath $rpath $elf
|
||||||
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $elf
|
||||||
|
done
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
passthru = {
|
||||||
makeWrapper $out/opt/wavebox/wavebox-launcher $out/bin/wavebox \
|
updateScript = writeScript "update-wavebox.sh" ''
|
||||||
--prefix PATH : ${xdg-utils}/bin
|
#!/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"]["deb"] | match("https://download.wavebox.app/stable/linux/deb/amd64/wavebox_(.+)_amd64.deb").captures[0]["string"]')
|
||||||
|
nix-update wavebox --version "$version"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.updateScript = ./update.sh;
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Wavebox messaging application";
|
|
||||||
homepage = "https://wavebox.io";
|
|
||||||
license = licenses.mpl20;
|
|
||||||
maintainers = with maintainers; [ rawkode ];
|
|
||||||
platforms = [ "x86_64-linux" ];
|
|
||||||
hydraPlatforms = [ ];
|
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
meta = {
|
||||||
|
description = "Wavebox Productivity Browser";
|
||||||
|
homepage = "https://wavebox.io";
|
||||||
|
license = lib.licenses.unfree;
|
||||||
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||||
|
maintainers = with lib.maintainers; [ flexiondotorg ];
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
mainProgram = "wavebox";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
#!/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"
|
|
@ -33719,7 +33719,7 @@ with pkgs;
|
|||||||
|
|
||||||
viber = callPackage ../applications/networking/instant-messengers/viber { };
|
viber = callPackage ../applications/networking/instant-messengers/viber { };
|
||||||
|
|
||||||
wavebox = libsForQt5.callPackage ../applications/networking/instant-messengers/wavebox { };
|
wavebox = callPackage ../applications/networking/instant-messengers/wavebox { };
|
||||||
|
|
||||||
sonic-pi = libsForQt5.callPackage ../applications/audio/sonic-pi { };
|
sonic-pi = libsForQt5.callPackage ../applications/audio/sonic-pi { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user