2021-01-17 02:30:45 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, which, pkg-config, makeWrapper
|
2021-05-19 19:57:35 +00:00
|
|
|
, ffmpeg, libGLU, libGL, freetype, libxml2, python3
|
2018-03-03 23:09:44 +00:00
|
|
|
, libobjc, AppKit, Foundation
|
2018-03-03 02:09:35 +00:00
|
|
|
, alsaLib ? null
|
2019-11-12 09:31:53 +00:00
|
|
|
, libdrm ? null
|
2018-03-03 02:09:35 +00:00
|
|
|
, libpulseaudio ? null
|
|
|
|
, libv4l ? null
|
|
|
|
, libX11 ? null
|
|
|
|
, libXdmcp ? null
|
|
|
|
, libXext ? null
|
|
|
|
, libXxf86vm ? null
|
2019-11-12 09:31:53 +00:00
|
|
|
, mesa ? null
|
2018-03-03 02:09:35 +00:00
|
|
|
, SDL2 ? null
|
|
|
|
, udev ? null
|
2016-05-27 00:24:26 +00:00
|
|
|
, enableNvidiaCgToolkit ? false, nvidia_cg_toolkit ? null
|
2018-03-03 02:09:35 +00:00
|
|
|
, withVulkan ? stdenv.isLinux, vulkan-loader ? null
|
2018-08-20 18:43:41 +00:00
|
|
|
, fetchurl
|
2020-03-11 02:54:31 +00:00
|
|
|
, wayland
|
|
|
|
, libxkbcommon
|
2016-05-27 00:24:26 +00:00
|
|
|
}:
|
|
|
|
|
2021-01-15 13:21:58 +00:00
|
|
|
with lib;
|
2013-06-26 11:25:09 +00:00
|
|
|
|
2020-03-22 03:36:54 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "retroarch-bare";
|
2020-03-22 02:46:36 +00:00
|
|
|
version = "1.8.5";
|
2013-06-26 11:25:09 +00:00
|
|
|
|
2016-05-27 00:24:26 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libretro";
|
|
|
|
repo = "RetroArch";
|
2020-03-22 02:46:36 +00:00
|
|
|
sha256 = "1pg8j9wvwgrzsv4xdai6i6jgdcc922v0m42rbqxvbghbksrc8la3";
|
2016-05-27 00:24:26 +00:00
|
|
|
rev = "v${version}";
|
2013-06-26 11:25:09 +00:00
|
|
|
};
|
|
|
|
|
2021-01-17 02:30:45 +00:00
|
|
|
nativeBuildInputs = [ pkg-config wayland ]
|
2019-11-10 01:13:39 +00:00
|
|
|
++ optional withVulkan makeWrapper;
|
2013-06-26 11:25:09 +00:00
|
|
|
|
2021-05-19 19:57:35 +00:00
|
|
|
buildInputs = [ ffmpeg freetype libxml2 libGLU libGL python3 SDL2 which ]
|
2018-03-03 02:09:35 +00:00
|
|
|
++ optional enableNvidiaCgToolkit nvidia_cg_toolkit
|
2019-11-10 01:13:39 +00:00
|
|
|
++ optional withVulkan vulkan-loader
|
2018-03-03 23:09:44 +00:00
|
|
|
++ optionals stdenv.isDarwin [ libobjc AppKit Foundation ]
|
2019-11-12 09:31:53 +00:00
|
|
|
++ optionals stdenv.isLinux [ alsaLib libdrm libpulseaudio libv4l libX11
|
2020-03-11 02:54:31 +00:00
|
|
|
libXdmcp libXext libXxf86vm mesa udev
|
|
|
|
wayland libxkbcommon ];
|
|
|
|
|
2018-03-03 02:09:35 +00:00
|
|
|
enableParallelBuilding = true;
|
2016-03-13 23:56:12 +00:00
|
|
|
|
2021-01-15 13:21:58 +00:00
|
|
|
configureFlags = lib.optionals stdenv.isLinux [ "--enable-kms" "--enable-egl" ];
|
2019-11-12 09:31:53 +00:00
|
|
|
|
2018-05-11 01:07:11 +00:00
|
|
|
postInstall = optionalString withVulkan ''
|
2018-03-03 02:09:35 +00:00
|
|
|
wrapProgram $out/bin/retroarch --prefix LD_LIBRARY_PATH ':' ${vulkan-loader}/lib
|
2016-03-13 23:56:12 +00:00
|
|
|
'';
|
|
|
|
|
2018-03-03 02:09:35 +00:00
|
|
|
preFixup = "rm $out/bin/retroarch-cg2glsl";
|
Replaced retroarchBare with retroarchBareMaster, also added a few new libretro cores
retroarchBare was too old for any practical use at this point, so it was removed in favor
of fetching releases from git. RetroArch often recommends checkout out the latest git master
if you are on a desktop platform, so we are conforming with their recommendation. I plan on
bumping the git of retroarch and each core every month, and I plan on adding more libretro
cores in the future.
The libretro cores that were added are nestopia, quicknes, snes9x, and vba-m
planned next are : bsnes-accuracy, bsnes-balanced, bsnes-performance, a few libretro mame ports
Closes #4448
2014-10-10 03:11:54 +00:00
|
|
|
|
2016-05-27 00:24:26 +00:00
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://libretro.com";
|
Replaced retroarchBare with retroarchBareMaster, also added a few new libretro cores
retroarchBare was too old for any practical use at this point, so it was removed in favor
of fetching releases from git. RetroArch often recommends checkout out the latest git master
if you are on a desktop platform, so we are conforming with their recommendation. I plan on
bumping the git of retroarch and each core every month, and I plan on adding more libretro
cores in the future.
The libretro cores that were added are nestopia, quicknes, snes9x, and vba-m
planned next are : bsnes-accuracy, bsnes-balanced, bsnes-performance, a few libretro mame ports
Closes #4448
2014-10-10 03:11:54 +00:00
|
|
|
description = "Multi-platform emulator frontend for libretro cores";
|
|
|
|
license = licenses.gpl3;
|
2016-05-27 00:24:26 +00:00
|
|
|
platforms = platforms.all;
|
2020-03-22 02:58:58 +00:00
|
|
|
maintainers = with maintainers; [ MP2E edwtjo matthewbauer kolbycrouch ];
|
2013-06-26 11:25:09 +00:00
|
|
|
};
|
|
|
|
}
|