nixpkgs/pkgs/misc/emulators/retroarch/wrapper.nix
Thiago Kenji Okada 75e1954f63 retroarch: 1.9.13.2 -> 1.9.2
From retroarch 1.9.3 and above, it stops loading the cores.

This probably can be fixed, but for now at least this brings the
retroarch to a newer (working) version.
2021-11-17 12:00:36 -03:00

38 lines
922 B
Nix

{ stdenv, lib, makeWrapper, retroarch, cores ? [ ] }:
stdenv.mkDerivation {
pname = "retroarch";
version = lib.getVersion retroarch;
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
mkdir -p $out/lib
for coreDir in $cores
do
ln -s $coreDir/* $out/lib/.
done
ln -s -t $out ${retroarch}/share
if [ -d ${retroarch}/Applications ]; then
ln -s -t $out ${retroarch}/Applications
fi
makeWrapper ${retroarch}/bin/retroarch $out/bin/retroarch \
--suffix-each LD_LIBRARY_PATH ':' "$cores" \
--add-flags "-L $out/lib/" \
'';
cores = map (x: x + x.libretroCore) cores;
preferLocalBuild = true;
meta = with retroarch.meta; {
inherit license homepage platforms maintainers;
description = description
+ " (with cores: "
+ lib.concatStringsSep ", " (map (x: ""+x.name) cores)
+ ")";
};
}