nixpkgs/pkgs/misc/emulators/retroarch/default.nix

65 lines
1.9 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, makeDesktopItem, coreutils, which, pkgconfig
, ffmpeg, libGLU_combined, freetype, libxml2, python34
, enableNvidiaCgToolkit ? false, nvidia_cg_toolkit ? null
, alsaLib ? null, libv4l ? null
, udev ? null, libX11 ? null, libXext ? null, libXxf86vm ? null
, libXdmcp ? null, SDL ? null, libpulseaudio ? null
}:
with stdenv.lib;
2013-06-26 11:25:09 +00:00
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
2013-06-26 11:25:09 +00:00
stdenv.mkDerivation rec {
name = "retroarch-bare-${version}";
2017-06-04 01:20:30 +00:00
version = "1.6.0";
2013-06-26 11:25:09 +00:00
src = fetchFromGitHub {
owner = "libretro";
repo = "RetroArch";
2017-06-04 01:20:30 +00:00
sha256 = "1ym2kws58fbavkc3giz5xqaqiqqdbf7wrz7y7iw53p1bnkc3l8yi";
rev = "v${version}";
2013-06-26 11:25:09 +00:00
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ ffmpeg libGLU_combined freetype libxml2 coreutils python34 which SDL ]
++ optional enableNvidiaCgToolkit nvidia_cg_toolkit
++ optionals stdenv.isLinux [ udev alsaLib libX11 libXext libXxf86vm libXdmcp libv4l libpulseaudio ];
configureScript = "sh configure";
2013-06-26 11:25:09 +00:00
patchPhase = ''
export GLOBAL_CONFIG_DIR=$out/etc
sed -e 's#/bin/true#${coreutils}/bin/true#' -i qb/qb.libs.sh
2013-06-26 11:25:09 +00:00
'';
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 = {
homepage = http://libretro.org/;
description = "Multi-platform emulator frontend for libretro cores";
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [ MP2E edwtjo matthewbauer ];
2013-06-26 11:25:09 +00:00
};
}