mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 17:53:37 +00:00
d3d99c715f
binance: 1.36.0 -> 1.39.0
57 lines
1.4 KiB
Nix
57 lines
1.4 KiB
Nix
{ lib, stdenv, fetchurl, dpkg, autoPatchelfHook, makeWrapper, electron
|
|
, alsa-lib, gtk3, libxshmfence, mesa, nss, popt }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "binance";
|
|
version = "1.39.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/binance/desktop/releases/download/v${version}/${pname}-${version}-amd64-linux.deb";
|
|
sha256 = "sha256-6VQerIzX2u8QGUsa8kvu6Qud3OEn9lrZkQddfkZ1X0g=";
|
|
};
|
|
|
|
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";
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
|
license = licenses.unfree;
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|