1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00

Merge pull request #143891 from aanderse/kodi

kodi.packages.libretro-snes9x: init at 1.60.0.29
This commit is contained in:
Aaron Andersen 2021-11-02 17:21:17 -04:00 committed by GitHub
commit 79be4cb011
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 70 additions and 3 deletions

View file

@ -0,0 +1,31 @@
{ lib, rel, buildKodiBinaryAddon, fetchFromGitHub, libretro, snes9x }:
buildKodiBinaryAddon rec {
pname = "kodi-libretro-snes9x";
namespace = "game.libretro.snes9x";
version = "1.60.0.29";
src = fetchFromGitHub {
owner = "kodi-game";
repo = "game.libretro.snes9x";
rev = "${version}-${rel}";
sha256 = "1wyfkg4fncc604alnbaqk92fi1h80n7bwiqfkb8479x5517byab1";
};
extraCMakeFlags = [
"-DSNES9X_LIB=${snes9x}/lib/retroarch/cores/snes9x_libretro.so"
];
extraBuildInputs = [ snes9x ];
propagatedBuildInputs = [
libretro
];
meta = with lib; {
homepage = "https://github.com/kodi-game/game.libretro.snes9x";
description = "Snes9X GameClient for Kodi";
platforms = platforms.all;
license = licenses.gpl2Only;
maintainers = teams.kodi.members;
};
}

View file

@ -0,0 +1,24 @@
{ lib, rel, buildKodiBinaryAddon, fetchFromGitHub, tinyxml }:
buildKodiBinaryAddon rec {
pname = "libretro";
namespace = "game.libretro";
version = "19.0.0";
src = fetchFromGitHub {
owner = "kodi-game";
repo = "game.libretro";
rev = "${version}-${rel}";
sha256 = "1831wbbc4a545lr4mg1fm4sbx75k5lkrfqaa5fh308aar0nm974d";
};
extraBuildInputs = [ tinyxml ];
meta = with lib; {
homepage = "https://github.com/kodi-game/game.libretro";
description = "Libretro wrapper for Kodi's Game API";
platforms = platforms.all;
license = licenses.gpl2Only;
maintainers = teams.kodi.members;
};
}

View file

@ -5,6 +5,7 @@
, extraNativeBuildInputs ? []
, extraBuildInputs ? []
, extraRuntimeDependencies ? []
, extraCMakeFlags ? []
, extraInstallPhase ? "", ... } @ attrs:
toKodiAddon (stdenv.mkDerivation ({
name = "kodi-" + name;
@ -19,7 +20,7 @@ toKodiAddon (stdenv.mkDerivation ({
# disables check ensuring install prefix is that of kodi
cmakeFlags = [
"-DOVERRIDE_PATHS=1"
];
] ++ extraCMakeFlags;
# kodi checks for addon .so libs existance in the addon folder (share/...)
# and the non-wrapped kodi lib/... folder before even trying to dlopen
@ -28,7 +29,10 @@ toKodiAddon (stdenv.mkDerivation ({
runHook preInstall
make install
ln -s $out/lib/addons/${n}/${n}.so.${version} $out${addonDir}/${n}/${n}.so.${version}
[[ -f $out/lib/addons/${n}/${n}.so ]] && ln -s $out/lib/addons/${n}/${n}.so $out${addonDir}/${n}/${n}.so || true
[[ -f $out/lib/addons/${n}/${n}.so.${version} ]] && ln -s $out/lib/addons/${n}/${n}.so.${version} $out${addonDir}/${n}/${n}.so.${version} || true
${extraInstallPhase}
runHook postInstall

View file

@ -1,7 +1,11 @@
{ lib, newScope, kodi }:
{ lib, newScope, kodi, libretro }:
with lib;
let
inherit (libretro) snes9x;
in
let self = rec {
addonDir = "/share/kodi/addons";
@ -68,6 +72,10 @@ let self = rec {
snes = callPackage ../applications/video/kodi-packages/controllers { controller = "snes"; };
};
libretro = callPackage ../applications/video/kodi-packages/libretro { };
libretro-snes9x = callPackage ../applications/video/kodi-packages/libretro-snes9x { inherit snes9x; };
jellyfin = callPackage ../applications/video/kodi-packages/jellyfin { };
joystick = callPackage ../applications/video/kodi-packages/joystick { };