webull-desktop: 8.9.0 -> 9.3.0 (#509428)
This commit is contained in:
@@ -3,30 +3,35 @@
|
||||
stdenv,
|
||||
fetchurl,
|
||||
autoPatchelfHook,
|
||||
curl,
|
||||
curlWithGnuTls,
|
||||
dpkg,
|
||||
makeBinaryWrapper,
|
||||
alsa-lib,
|
||||
e2fsprogs,
|
||||
fontconfig,
|
||||
fribidi,
|
||||
gmp,
|
||||
gnutls,
|
||||
harfbuzz,
|
||||
hicolor-icon-theme,
|
||||
libdrm,
|
||||
libGL,
|
||||
libgpg-error,
|
||||
libpq,
|
||||
libthai,
|
||||
libxrandr,
|
||||
nss,
|
||||
p11-kit,
|
||||
zlib,
|
||||
unixodbc,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "webull-desktop";
|
||||
version = "8.9.0";
|
||||
version = "9.3.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://u1sweb.webullfintech.com/us/Webull%20Desktop_8.9.0_80009000_global_x64signed.deb";
|
||||
hash = "sha256-brt5EXUE9g72vN2Kx9/jf4P/lkVfWLsbzJIf13phgdI=";
|
||||
url = "https://u1sweb.webullfintech.com/us/Webull%20Desktop_9.3.0_9100000072_global_x64signed.deb";
|
||||
hash = "sha256-7xP4Q8eDMj2Pj/Zksr2gROJR1fPd4lz2zPpcAcu2o80=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -38,17 +43,60 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
buildInputs = [
|
||||
stdenv.cc.cc.lib
|
||||
alsa-lib
|
||||
curl # libsentry.so requires SONAME libcurl.so.4 with the "CURL_OPENSSL_4" symbol
|
||||
|
||||
# ... but libwbhttpsclient.so requires SONAME libcurl-gnutls.so.4 with the "CURL_GNUTLS_3" symbol
|
||||
(curlWithGnuTls.overrideAttrs (previousAttrs: rec {
|
||||
# Version 8.10.0 is the latest that can be easily patched to include the "CURL_GNUTLS_3" symbol
|
||||
version = "8.10.0";
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"https://curl.haxx.se/download/curl-${version}.tar.xz"
|
||||
"https://github.com/curl/curl/releases/download/curl-${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}/curl-${version}.tar.xz"
|
||||
];
|
||||
hash = "sha256-5rFC8OhelUdZ034mo2J+IngTdZW+gOOoYMQ1PkM15aA=";
|
||||
};
|
||||
|
||||
# Keep the "CURL_GNUTLS_3" symbol which is sought by libwbhttpsclient.so
|
||||
patches = (previousAttrs.patches or [ ]) ++ [
|
||||
(builtins.toFile "curl-gnutls-keep-symbols-compatible.patch" ''
|
||||
--- a/lib/libcurl.vers.in
|
||||
+++ b/lib/libcurl.vers.in
|
||||
@@ -6,7 +6,7 @@ HIDDEN
|
||||
_save*;
|
||||
};
|
||||
|
||||
-CURL_@CURL_LT_SHLIB_VERSIONED_FLAVOUR@4
|
||||
+CURL_@CURL_LT_SHLIB_VERSIONED_FLAVOUR@3
|
||||
{
|
||||
global: curl_*;
|
||||
local: *;
|
||||
'')
|
||||
];
|
||||
|
||||
# This prevents libsentry.so trying to load the 'wrong' libcurl.so
|
||||
# (let libsentry.so load the stock NixOS libcurl.so that has the "CURL_OPENSSL_4" symbol)
|
||||
postFixup = (previousAttrs.postFixup or "") + ''
|
||||
patchelf --set-soname libcurl-gnutls.so.4 $out/lib/libcurl.so.4.8.0
|
||||
'';
|
||||
}))
|
||||
e2fsprogs
|
||||
fontconfig
|
||||
fribidi
|
||||
gmp
|
||||
gnutls
|
||||
harfbuzz
|
||||
libdrm
|
||||
libGL
|
||||
libgpg-error
|
||||
libthai
|
||||
libpq
|
||||
libxrandr
|
||||
nss
|
||||
p11-kit
|
||||
zlib
|
||||
unixodbc
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
@@ -60,14 +108,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
mkdir $out/bin
|
||||
ln -s $out/usr/local/WebullDesktop/WebullDesktop $out/bin/webull-desktop
|
||||
substituteInPlace $out/usr/share/applications/WebullDesktop.desktop \
|
||||
--replace-fail Categories=Utiltity Categories=Finance \
|
||||
--replace-fail "Exec=/usr/local/WebullDesktop/WebullDesktop" "Exec=webull-desktop" \
|
||||
--replace-fail "Icon=WebullDesktop.png" "Icon=WebullDesktop" \
|
||||
--replace-fail "Version=8.2.0" "Version=${finalAttrs.version}"
|
||||
|
||||
# Remove problematic bundled libraries for which we have installed local versions
|
||||
rm -f $out/usr/local/WebullDesktop/libgnutls.so*
|
||||
rm -f $out/usr/local/WebullDesktop/libnghttp2.so*
|
||||
|
||||
# Make sure that WebullDesktop.desktop is found by launchers
|
||||
ln -s $out/usr/share $out/share
|
||||
|
||||
|
||||
addAutoPatchelfSearchPath $out/usr/local/WebullDesktop
|
||||
addAutoPatchelfSearchPath $out/usr/local/WebullDesktop/platforms
|
||||
addAutoPatchelfSearchPath $out/usr/local/WebullDesktop/plugins/bearer
|
||||
@@ -88,10 +138,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
meta = {
|
||||
description = "Webull desktop trading application";
|
||||
homepage = "https://www.webull.com/trading-platforms/desktop-app";
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
||||
license = lib.licenses.unfree;
|
||||
maintainers = with lib.maintainers; [ fauxmight ];
|
||||
maintainers = [ lib.maintainers.fauxmight ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
mainProgram = "webull-desktop";
|
||||
knownVulnerabilities = [ "Depends on deprecated curl version 8.10.0" ];
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user