nethack: add qt plugin wrapper

This commit is contained in:
Franz Pletz 2018-07-15 23:06:59 +02:00
parent 935332d648
commit de24fd7525
No known key found for this signature in database
GPG key ID: 846FDED7792617B4

View file

@ -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/;