summary refs log tree commit diff
path: root/pkgs/games/nethack/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/nethack/default.nix')
-rw-r--r--pkgs/games/nethack/default.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/games/nethack/default.nix b/pkgs/games/nethack/default.nix
index 67f1a1d452c..db959177eb5 100644
--- a/pkgs/games/nethack/default.nix
+++ b/pkgs/games/nethack/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, lib, fetchurl, writeScript, coreutils, ncurses, gzip, flex, bison, less
+{ stdenv, lib, fetchurl, writeScript, coreutils, ncurses, gzip, flex, bison
+, less, makeWrapper
 , x11Mode ? false, qtMode ? false, libXaw, libXext, mkfontdir, pkgconfig, qt5
 }:
 
@@ -35,7 +36,7 @@ in stdenv.mkDerivation rec {
                       ++ lib.optionals x11Mode [ mkfontdir ]
                       ++ lib.optionals qtMode [
                            pkgconfig mkfontdir qt5.qtbase.dev
-                           qt5.qtmultimedia.dev
+                           qt5.qtmultimedia.dev makeWrapper
                          ];
 
   makeFlags = [ "PREFIX=$(out)" ];
@@ -115,6 +116,11 @@ in stdenv.mkDerivation rec {
     ${lib.optionalString qtMode "mv $out/bin/nethack $out/bin/nethack-qt"}
   '';
 
+  postFixup = lib.optionalString qtMode ''
+    wrapProgram $out/bin/nethack-qt \
+      --prefix QT_PLUGIN_PATH : "${qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}"
+  '';
+
   meta = with stdenv.lib; {
     description = "Rogue-like game";
     homepage = http://nethack.org/;