about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/path-of-building/default.nix69
-rw-r--r--pkgs/games/stepmania/default.nix5
2 files changed, 67 insertions, 7 deletions
diff --git a/pkgs/games/path-of-building/default.nix b/pkgs/games/path-of-building/default.nix
index 1e2a2811769a1..b3f5549c487c8 100644
--- a/pkgs/games/path-of-building/default.nix
+++ b/pkgs/games/path-of-building/default.nix
@@ -1,6 +1,21 @@
-{ stdenv, lib, fetchFromGitHub, unzip, meson, ninja, pkg-config, qtbase, qttools, wrapQtAppsHook, luajit }:
+{
+  stdenv,
+  lib,
+  fetchFromGitHub,
+  unzip,
+  meson,
+  ninja,
+  pkg-config,
+  qtbase,
+  qttools,
+  wrapQtAppsHook,
+  icoutils,
+  copyDesktopItems,
+  makeDesktopItem,
+  luajit,
+}:
 let
-  data = stdenv.mkDerivation(finalAttrs: {
+  data = stdenv.mkDerivation (finalAttrs: {
     pname = "path-of-building-data";
     version = "2.42.0";
 
@@ -42,12 +57,35 @@ stdenv.mkDerivation {
     hash = "sha256-zhw2PZ6ZNMgZ2hG+a6AcYBkeg7kbBHNc2eSt4if17Wk=";
   };
 
-  nativeBuildInputs = [ meson ninja pkg-config qttools wrapQtAppsHook ];
-  buildInputs = [ qtbase luajit luajit.pkgs.lua-curl ];
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    qttools
+    wrapQtAppsHook
+    icoutils
+  ] ++ lib.optional stdenv.isLinux copyDesktopItems;
+
+  buildInputs = [
+    qtbase
+    luajit
+    luajit.pkgs.lua-curl
+  ];
 
   installPhase = ''
     runHook preInstall
     install -Dm555 pobfrontend $out/bin/pobfrontend
+
+    wrestool -x -t 14 ${data.src}/runtime/Path{space}of{space}Building.exe -o pathofbuilding.ico
+    icotool -x pathofbuilding.ico
+
+    for size in 16 32 48 256; do
+      mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
+      install -Dm 644 pathofbuilding*"$size"x"$size"*.png \
+        $out/share/icons/hicolor/"$size"x"$size"/apps/pathofbuilding.png
+    done
+    rm pathofbuilding.ico
+
     runHook postInstall
   '';
 
@@ -59,6 +97,27 @@ stdenv.mkDerivation {
     )
   '';
 
+  desktopItems = [
+    (makeDesktopItem {
+      name = "path-of-building";
+      desktopName = "Path of Building";
+      comment = "Offline build planner for Path of Exile";
+      exec = "pobfrontend %U";
+      terminal = false;
+      type = "Application";
+      icon = "pathofbuilding";
+      categories = [ "Game" ];
+      keywords = [
+        "poe"
+        "pob"
+        "pobc"
+        "path"
+        "exile"
+      ];
+      mimeTypes = [ "x-scheme-handler/pob" ];
+    })
+  ];
+
   passthru.data = data;
 
   meta = {
@@ -67,6 +126,6 @@ stdenv.mkDerivation {
     license = lib.licenses.mit;
     maintainers = [ lib.maintainers.k900 ];
     mainProgram = "pobfrontend";
-    broken = stdenv.isDarwin;  # doesn't find uic6 for some reason
+    broken = stdenv.isDarwin; # doesn't find uic6 for some reason
   };
 }
diff --git a/pkgs/games/stepmania/default.nix b/pkgs/games/stepmania/default.nix
index bfd871a2a1c14..000b07c5433d9 100644
--- a/pkgs/games/stepmania/default.nix
+++ b/pkgs/games/stepmania/default.nix
@@ -11,6 +11,7 @@
 , gtk2
 , libmad
 , libogg
+, libpng
 , libpulseaudio
 , libvorbis
 , udev
@@ -51,6 +52,7 @@ stdenv.mkDerivation {
     gtk2
     libmad
     libogg
+    libpng
     libpulseaudio
     libvorbis
     udev
@@ -59,6 +61,7 @@ stdenv.mkDerivation {
 
   cmakeFlags = [
     "-DWITH_SYSTEM_FFMPEG=1"
+    "-DWITH_SYSTEM_PNG=on"
     "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
     "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
   ];
@@ -79,8 +82,6 @@ stdenv.mkDerivation {
     platforms = platforms.linux;
     license = licenses.mit; # expat version
     maintainers = with maintainers; [ h7x4 ];
-    # never built on aarch64-linux since first introduction in nixpkgs
-    broken = stdenv.isLinux && stdenv.isAarch64;
     mainProgram = "stepmania";
   };
 }