xonotic: use copyDesktopItems hook

This commit is contained in:
Fabian Möller 2020-11-27 13:45:59 +01:00 committed by Milan Pässler
parent 81e2df3ce1
commit 74088bad64

View File

@ -1,5 +1,5 @@
{ lib, stdenv, fetchurl, fetchzip, makeWrapper, runCommandNoCC, makeDesktopItem { lib, stdenv, fetchurl, fetchzip, makeWrapper, runCommandNoCC, makeDesktopItem
, xonotic-data , xonotic-data, copyDesktopItems
, # required for both , # required for both
unzip, libjpeg, zlib, libvorbis, curl unzip, libjpeg, zlib, libvorbis, curl
, # glx , # glx
@ -131,7 +131,8 @@ in rec {
xonotic = runCommandNoCC "xonotic${variant}-${version}" { xonotic = runCommandNoCC "xonotic${variant}-${version}" {
inherit xonotic-unwrapped; inherit xonotic-unwrapped;
buildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper copyDesktopItems ];
desktopItems = [ desktopItem ];
passthru = { passthru = {
inherit version; inherit version;
meta = meta // { meta = meta // {
@ -151,7 +152,7 @@ in rec {
'' + lib.optionalString (withSDL || withGLX) '' '' + lib.optionalString (withSDL || withGLX) ''
mkdir -p $out/share mkdir -p $out/share
ln -s ${xonotic-unwrapped}/share/icons $out/share/icons ln -s ${xonotic-unwrapped}/share/icons $out/share/icons
${desktopItem.buildCommand} copyDesktopItems
'' + '' '' + ''
for binary in $out/bin/xonotic-*; do for binary in $out/bin/xonotic-*; do
wrapProgram $binary --add-flags "-basedir ${xonotic-data}" wrapProgram $binary --add-flags "-basedir ${xonotic-data}"