retroarch: improvements

-  Added missing freedesktop items (`*.desktop` and icon).

    Note that for the moment, only added an `*.svg`
    icon as was the only available. It does not give
    us the best results (at least in xfce). We may decide
    later on to extract the content of the `*.ico` instead
    which is a bit more involved.
This commit is contained in:
Raymond Gauthier 2016-03-13 19:56:12 -04:00
parent 34721289d9
commit 9be54a523e
2 changed files with 26 additions and 1 deletions

View File

@ -1,7 +1,21 @@
{ stdenv, fetchgit, pkgconfig, ffmpeg, mesa, nvidia_cg_toolkit
{ stdenv, fetchgit, makeDesktopItem, pkgconfig, ffmpeg, mesa, nvidia_cg_toolkit
, freetype, libxml2, libv4l, coreutils, python34, which, udev, alsaLib
, libX11, libXext, libXxf86vm, libXdmcp, SDL, libpulseaudio ? null }:
let
desktopItem = makeDesktopItem {
name = "retroarch";
exec = "retroarch";
icon = "retroarch";
comment = "Multi-Engine Platform";
desktopName = "RetroArch";
genericName = "Libretro Frontend";
categories = "Game;Emulator;";
#keywords = "multi;engine;emulator;xmb;";
};
in
stdenv.mkDerivation rec {
name = "retroarch-bare-${version}";
version = "2015-11-20";
@ -20,6 +34,14 @@ stdenv.mkDerivation rec {
sed -e 's#/bin/true#${coreutils}/bin/true#' -i qb/qb.libs.sh
'';
postInstall = ''
mkdir -p $out/share/icons/hicolor/scalable/apps
cp -p -T ./media/retroarch.svg $out/share/icons/hicolor/scalable/apps/retroarch.svg
mkdir -p "$out/share/applications"
cp ${desktopItem}/share/applications/* $out/share/applications
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {

View File

@ -18,6 +18,9 @@ stdenv.mkDerivation {
do
$(ln -s $coreDir/*.so $out/lib/.)
done)
ln -s -t $out ${retroarch}/share
makeWrapper ${retroarch}/bin/retroarch $out/bin/retroarch \
--suffix-each LD_LIBRARY_PATH ':' "$cores" \
--add-flags "-L $out/lib/ --menu" \