Created
June 5, 2023 07:31
-
-
Save daedric/b063165e3702acb2d8376f191ae8023a to your computer and use it in GitHub Desktop.
quick hack to get Boosteroid client running on linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, lib, fetchurl, dpkg, makeWrapper, | |
# deps | |
alsa-lib, dbus, fontconfig, freetype, libX11, libXfixes, libXi, libglvnd, libva | |
, libvdpau, libxcb, libxkbcommon, pcre2, systemd, wayland, xz, xorg | |
, ... }: | |
pkgs.stdenv.mkDerivation rec { | |
pname = "Boosteroid"; | |
version = "1.5.8"; | |
src = fetchurl { | |
url = "https://boosteroid.com/linux/installer/boosteroid-install-x64.deb"; | |
sha256 = "sha256-mzSSHX+iXDkloBmXPDDCd5Bmuvvc51ehKsTtdU5ndQo="; | |
curlOptsList = [ "-HUser-Agent: Wget/1.21.4" ]; | |
}; | |
nativeBuildInputs = [ dpkg makeWrapper ]; | |
rpath = lib.makeLibraryPath [ | |
alsa-lib | |
dbus | |
fontconfig | |
freetype | |
libglvnd | |
libva | |
libvdpau | |
pcre2 | |
systemd | |
wayland | |
xorg.libX11 | |
xorg.libXfixes | |
xorg.libXi | |
xorg.libxcb | |
xorg.libxcb | |
libxkbcommon | |
xorg.xcbutilimage | |
xorg.xcbutilkeysyms | |
xorg.xcbutilrenderutil | |
xorg.xcbutilwm | |
xz | |
] + ":${pkgs.stdenv.cc.cc.lib}/lib64"; | |
dontUnpack = true; | |
dontBuild = true; | |
dontPatchELF = true; | |
installPhase = '' | |
runHook preInstall | |
# The deb file contains a setuid binary, so 'dpkg -x' doesn't work here | |
dpkg -x $src . | |
mkdir -p $out | |
mv usr $out | |
mv opt $out | |
# Otherwise it looks "suspicious" | |
chmod -R g-w $out | |
for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do | |
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true | |
patchelf --set-rpath ${rpath}:$out/usr/local/lib $file || true | |
done | |
makeWrapper $out/opt/BoosteroidGamesS.R.L./bin/Boosteroid $out/bin/Boosteroid | |
runHook postInstall | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment