gaming: Add melonDS
This commit is contained in:
parent
5074740992
commit
64490404ed
@ -7,16 +7,15 @@ in {
|
|||||||
enable = lib.mkEnableOption "Configure gaming options";
|
enable = lib.mkEnableOption "Configure gaming options";
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
nixpkgs.config.retroarch = {
|
|
||||||
enableDesmume = true;
|
|
||||||
enableMGBA = true;
|
|
||||||
enableDolphin = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
winePackages.stagingFull winetricks lutris-free-wrapped
|
winePackages.stagingFull winetricks lutris-free-wrapped
|
||||||
|
|
||||||
retroarch
|
(pkgs.callPackage ./wrapper.nix {
|
||||||
|
inherit (pkgs) retroarch;
|
||||||
|
cores = with pkgs.libretro; [
|
||||||
|
mgba mupen64plus melonds desmume dolphin
|
||||||
|
];
|
||||||
|
})
|
||||||
|
|
||||||
steam-wrapped # Custom package
|
steam-wrapped # Custom package
|
||||||
|
|
||||||
|
37
modules/programs/gaming/wrapper.nix
Normal file
37
modules/programs/gaming/wrapper.nix
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{ 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 changelog description homepage license maintainers platforms;
|
||||||
|
longDescription =
|
||||||
|
"RetroArch is the reference frontend for the libretro API. The following cores are included: "
|
||||||
|
+ lib.concatStringsSep ", " (map (x: "${x.name}") cores)
|
||||||
|
+ ".";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user