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

56 lines
1.7 KiB
Nix
Raw Normal View History

2018-03-03 03:09:35 +01:00
{ stdenv, fetchFromGitHub, which, pkgconfig, makeWrapper
, ffmpeg, libGLU_combined, freetype, libxml2, python34
2018-03-04 00:09:44 +01:00
, libobjc, AppKit, Foundation
2018-03-03 03:09:35 +01:00
, alsaLib ? null
, libpulseaudio ? null
, libv4l ? null
, libX11 ? null
, libXdmcp ? null
, libXext ? null
, libXxf86vm ? null
, SDL2 ? null
, udev ? null
, enableNvidiaCgToolkit ? false, nvidia_cg_toolkit ? null
2018-03-03 03:09:35 +01:00
, withVulkan ? stdenv.isLinux, vulkan-loader ? null
}:
with stdenv.lib;
2013-06-26 13:25:09 +02:00
stdenv.mkDerivation rec {
name = "retroarch-bare-${version}";
2018-03-03 03:09:35 +01:00
version = "1.7.1";
2013-06-26 13:25:09 +02:00
src = fetchFromGitHub {
owner = "libretro";
repo = "RetroArch";
2018-03-03 03:09:35 +01:00
sha256 = "0qv8ci76f5kwv5b49ijgpc6jdfp6sm21fw5hq06mq6ygyiy9vdzf";
rev = "v${version}";
2013-06-26 13:25:09 +02:00
};
2018-03-03 03:09:35 +01:00
nativeBuildInputs = [ pkgconfig ]
++ optional withVulkan [ makeWrapper ];
2013-06-26 13:25:09 +02:00
2018-03-05 12:49:52 +01:00
buildInputs = [ ffmpeg freetype libxml2 libGLU_combined python34 SDL2 which ]
2018-03-03 03:09:35 +01:00
++ optional enableNvidiaCgToolkit nvidia_cg_toolkit
++ optional withVulkan [ vulkan-loader ]
2018-03-04 00:09:44 +01:00
++ optionals stdenv.isDarwin [ libobjc AppKit Foundation ]
2018-03-03 03:09:35 +01:00
++ optionals stdenv.isLinux [ alsaLib libpulseaudio libv4l libX11
libXdmcp libXext libXxf86vm udev ];
2018-03-03 03:09:35 +01:00
enableParallelBuilding = true;
2018-03-03 03:09:35 +01:00
postInstall = optional withVulkan ''
wrapProgram $out/bin/retroarch --prefix LD_LIBRARY_PATH ':' ${vulkan-loader}/lib
'';
2018-03-03 03:09:35 +01:00
preFixup = "rm $out/bin/retroarch-cg2glsl";
meta = {
2018-03-03 03:09:35 +01:00
homepage = https://libretro.com;
description = "Multi-platform emulator frontend for libretro cores";
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [ MP2E edwtjo matthewbauer ];
2013-06-26 13:25:09 +02:00
};
}