Compare commits

...

2 commits

2 changed files with 42 additions and 7 deletions

View file

@ -1,6 +1,6 @@
{ {
inputs,
pkgs, pkgs,
inputs,
... ...
}: { }: {
home.packages = [ home.packages = [
@ -11,10 +11,8 @@
pkgs.protonplus pkgs.protonplus
pkgs.r2modman pkgs.r2modman
pkgs # steamtinkerlaunch dependencies
. # steamtinkerlaunch dependencies pkgs.xdotool
pkgs
.xdotool
pkgs.xorg.xwininfo pkgs.xorg.xwininfo
pkgs.yad pkgs.yad

View file

@ -29,6 +29,8 @@
cups, cups,
systemd, systemd,
buildFHSEnv, buildFHSEnv,
copyDesktopItems,
makeDesktopItem,
}: let }: let
cef = libcef.overrideAttrs (_: { cef = libcef.overrideAttrs (_: {
installPhase = let installPhase = let
@ -77,16 +79,17 @@
cp -r ../cmake $out cp -r ../cmake $out
''; '';
}); });
bolt = stdenv.mkDerivation (finalAttrs: { bolt = stdenv.mkDerivation (finalAttrs: {
pname = "bolt-launcher"; pname = "bolt-launcher";
version = "0.9.0"; version = "0.10.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "AdamCake"; owner = "AdamCake";
repo = "bolt"; repo = "bolt";
rev = finalAttrs.version; rev = finalAttrs.version;
fetchSubmodules = true; fetchSubmodules = true;
hash = "sha256-LIlRDcUWbQwIhFjtqYF+oVpTOPZ7IT0vMgysEVyJ1k8="; hash = "sha256-2IoFzD+yhQv1Y7D+abeNUT23BC4P1xZTALF8Y+Zsg44=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@ -94,6 +97,7 @@
ninja ninja
luajit luajit
makeWrapper makeWrapper
copyDesktopItems
]; ];
buildInputs = [ buildInputs = [
@ -106,6 +110,20 @@
jdk17 jdk17
]; ];
desktopItems = [
(makeDesktopItem {
inherit (bolt) name;
desktopName = "Bolt Launcher";
keywords = [
"Game"
];
exec = "${bolt.name}";
terminal = false;
categories = ["Game"];
icon = "bolt-launcher";
})
];
cmakeFlags = [ cmakeFlags = [
"-D CMAKE_BUILD_TYPE=Release" "-D CMAKE_BUILD_TYPE=Release"
"-D BOLT_LUAJIT_INCLUDE_DIR=${luajit}/include" "-D BOLT_LUAJIT_INCLUDE_DIR=${luajit}/include"
@ -113,6 +131,7 @@
]; ];
preConfigure = '' preConfigure = ''
ls -al
mkdir -p cef/dist/Release cef/dist/Resources cef/dist/include mkdir -p cef/dist/Release cef/dist/Resources cef/dist/include
ln -s ${cef}/lib/* cef/dist/Release ln -s ${cef}/lib/* cef/dist/Release
@ -128,6 +147,16 @@
ln -s ${cef}/CMakeLists.txt cef/dist ln -s ${cef}/CMakeLists.txt cef/dist
''; '';
postInstall = ''
for size in 16 32 64 128 256; do
size_dir="''${size}x''${size}"
ls -al $src/icon
mkdir -p $out/share/icons/hicolor/''${size_dir}/apps
cp $src/icon/$size.png $out/share/icons/hicolor/''${size_dir}/apps/bolt-launcher.png
done
mkdir -p $out/share/icons/hicolor/scalable/apps/
cp $src/icon/bolt.svg $out/share/icons/hicolor/scalable/apps/bolt-launcher.svg
'';
postFixup = '' postFixup = ''
makeWrapper "$out/opt/bolt-launcher/bolt" "$out/bin/${finalAttrs.pname}-${finalAttrs.version}" \ makeWrapper "$out/opt/bolt-launcher/bolt" "$out/bin/${finalAttrs.pname}-${finalAttrs.version}" \
--set JAVA_HOME "${jdk17}" --set JAVA_HOME "${jdk17}"
@ -159,6 +188,14 @@ in
libGL libGL
]); ]);
extraInstallCommands = ''
mkdir -p $out/share/applications $out/share/icons
ln -s ${bolt}/share/applications/*.desktop \
$out/share/applications/
ln -s ${bolt}/share/icons/hicolor \
$out/share/icons/hicolor
'';
runScript = "${bolt.name}"; runScript = "${bolt.name}";
meta = { meta = {
homepage = "https://github.com/Adamcake/Bolt"; homepage = "https://github.com/Adamcake/Bolt";