Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bolt-launcher: fix build #369521

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
204 changes: 99 additions & 105 deletions pkgs/by-name/bo/bolt-launcher/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,59 +32,55 @@
makeDesktopItem,
copyDesktopItems,
enableRS3 ? false,
}:
let
cef = libcef.overrideAttrs (oldAttrs: {
installPhase =
let
gl_rpath = lib.makeLibraryPath [
stdenv.cc.cc.lib
];
rpath = lib.makeLibraryPath [
glib
nss
nspr
atk
at-spi2-atk
libdrm
expat
xorg.libxcb
libxkbcommon
xorg.libX11
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
libgbm
gtk3
pango
cairo
alsa-lib
dbus
at-spi2-core
cups
xorg.libxshmfence
systemd
];
in
''
mkdir -p $out/lib/ $out/share/cef/
cp libcef_dll_wrapper/libcef_dll_wrapper.a $out/lib/
cp -r ../Resources/* $out/lib/
cp -r ../Release/* $out/lib/
patchelf --set-rpath "${rpath}" $out/lib/libcef.so
patchelf --set-rpath "${gl_rpath}" $out/lib/libEGL.so
patchelf --set-rpath "${gl_rpath}" $out/lib/libGLESv2.so
cp ../Release/*.bin $out/share/cef/
cp -r ../Resources/* $out/share/cef/
cp -r ../include $out
cp -r ../libcef_dll $out
cp -r ../cmake $out
'';
}: let
cef = libcef.overrideAttrs (_: {
installPhase = let
gl_rpath = lib.makeLibraryPath [
stdenv.cc.cc.lib
];
rpath = lib.makeLibraryPath [
glib
nss
nspr
atk
at-spi2-atk
libdrm
expat
xorg.libxcb
libxkbcommon
xorg.libX11
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
libgbm
gtk3
pango
cairo
alsa-lib
dbus
at-spi2-core
cups
xorg.libxshmfence
systemd
];
in ''
mkdir -p $out/lib/ $out/share/cef/
cp libcef_dll_wrapper/libcef_dll_wrapper.a $out/lib/
cp -r ../Resources/* $out/lib/
cp -r ../Release/* $out/lib/
patchelf --set-rpath "${rpath}" $out/lib/libcef.so
patchelf --set-rpath "${gl_rpath}" $out/lib/libEGL.so
patchelf --set-rpath "${gl_rpath}" $out/lib/libGLESv2.so
cp ../Release/*.bin $out/share/cef/
cp -r ../Resources/* $out/share/cef/
cp -r ../include $out
cp -r ../libcef_dll $out
cp -r ../cmake $out
'';
});
in
let
in let
bolt = stdenv.mkDerivation (finalAttrs: {
pname = "bolt-launcher";
version = "0.9.0";
Expand Down Expand Up @@ -138,7 +134,7 @@ let
'';

postFixup = ''
makeWrapper "$out/opt/bolt-launcher/bolt" "$out/bin/${finalAttrs.pname}-${finalAttrs.version}" \
makeWrapper "$out/opt/bolt-launcher/bolt" "$out/bin/${finalAttrs.pname}" \
--set JAVA_HOME ${jdk17}
mkdir -p $out/lib
cp $out/usr/local/lib/libbolt-plugin.so $out/lib
Expand All @@ -154,61 +150,59 @@ let
desktopName = "Bolt Launcher";
genericName = finalAttrs.pname;
comment = "An alternative launcher for RuneScape";
exec = "${finalAttrs.pname}-${finalAttrs.version}";
exec = "${finalAttrs.pname}";
icon = finalAttrs.pname;
categories = [ "Game" ];
categories = ["Game"];
})
];
});
in
buildFHSEnv {
inherit (bolt) pname version;

targetPkgs =
pkgs:
[ bolt ]
++ (with pkgs; [
xorg.libSM
xorg.libXxf86vm
xorg.libX11
glib
pango
cairo
gdk-pixbuf
libz
libcap
libsecret
SDL2
libGL
])
++ lib.optionals enableRS3 (
with pkgs;
[
gtk2-x11
openssl_1_1
]
);

extraInstallCommands = ''
mkdir -p $out/share/applications
mkdir -p $out/share/icons/hicolor/256x256/apps

ln -s ${bolt}/share/applications/*.desktop $out/share/applications/

ln -s ${bolt}/share/icons/hicolor/256x256/apps/*.png $out/share/icons/hicolor/256x256/apps/
'';

runScript = "${bolt.name}";

meta = {
homepage = "https://github.com/Adamcake/Bolt";
description = "An alternative launcher for RuneScape.";
longDescription = ''
Bolt Launcher supports HDOS/RuneLite by default with an optional feature flag for RS3 (enableRS3).
buildFHSEnv {
inherit (bolt) pname version;

targetPkgs = pkgs:
[bolt]
++ (with pkgs; [
xorg.libSM
xorg.libXxf86vm
xorg.libX11
glib
pango
cairo
gdk-pixbuf
libz
libcap
libsecret
SDL2
libGL
])
++ lib.optionals enableRS3 (
with pkgs; [
gtk2-x11
openssl_1_1
]
);

extraInstallCommands = ''
mkdir -p $out/share/applications
mkdir -p $out/share/icons/hicolor/256x256/apps

ln -s ${bolt}/share/applications/*.desktop $out/share/applications/

ln -s ${bolt}/share/icons/hicolor/256x256/apps/*.png $out/share/icons/hicolor/256x256/apps/
'';
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ nezia ];
platforms = lib.platforms.linux;
mainProgram = "${bolt.name}";
};
}

runScript = "${bolt.pname}";

meta = {
homepage = "https://github.com/Adamcake/Bolt";
description = "An alternative launcher for RuneScape.";
longDescription = ''
Bolt Launcher supports HDOS/RuneLite by default with an optional feature flag for RS3 (enableRS3).
'';
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [nezia];
platforms = lib.platforms.linux;
mainProgram = "${bolt.pname}";
};
}
Loading