2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, fetchurl, dpkg, autoPatchelfHook, makeWrapper, electron
|
|
|
|
, alsa-lib, gtk3, libxshmfence, mesa, nss, popt }:
|
2021-10-28 06:52:43 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-10-28 06:52:43 +00:00
|
|
|
pname = "binance";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "1.39.0";
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/binance/desktop/releases/download/v${version}/${pname}-${version}-amd64-linux.deb";
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "sha256-6VQerIzX2u8QGUsa8kvu6Qud3OEn9lrZkQddfkZ1X0g=";
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
dpkg
|
|
|
|
autoPatchelfHook
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ alsa-lib gtk3 libxshmfence mesa nss popt ];
|
|
|
|
|
|
|
|
libPath = lib.makeLibraryPath buildInputs;
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
dpkg-deb -x ${src} ./
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mv usr $out
|
|
|
|
mv opt $out
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace $out/share/applications/binance.desktop --replace '/opt/Binance' $out/bin
|
|
|
|
|
|
|
|
makeWrapper ${electron}/bin/electron \
|
|
|
|
$out/bin/binance \
|
|
|
|
--add-flags $out/opt/Binance/resources/app.asar \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${libPath}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Binance Cryptoexchange Official Desktop Client";
|
|
|
|
homepage = "https://www.binance.com/en/desktop-download";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2021-10-28 06:52:43 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|