Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6324d2fcda38
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 34675628055d
Choose a head ref
  • 9 commits
  • 5 files changed
  • 2 contributors

Commits on Jun 15, 2017

  1. libhdhomerun: init at revision 1efbcb2

    (cherry picked from commit 031156c)
    titanous authored and edwtjo committed Jun 15, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    edwtjo Edward Tjörnhammar
    Copy the full SHA
    d4b6398 View commit details
  2. kodi: init pvr-hdhomerun plugin at 2.4.7

    (cherry picked from commit 8a978a7)
    titanous authored and edwtjo committed Jun 15, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    edwtjo Edward Tjörnhammar
    Copy the full SHA
    c864dff View commit details
  3. kodiPlugins.exodus: 3.0.5 -> 3.1.13

    (cherry picked from commit 1f98e47)
    edwtjo committed Jun 15, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    edwtjo Edward Tjörnhammar
    Copy the full SHA
    3c66850 View commit details
  4. kodiPlugins.svtplay: 4.0.42 -> 4.0.48

    (cherry picked from commit 5b01ba9)
    edwtjo committed Jun 15, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    edwtjo Edward Tjörnhammar
    Copy the full SHA
    e88e1de View commit details
  5. kodiPlugins: move build funs to common

    (cherry picked from commit 513e66e)
    edwtjo committed Jun 15, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    edwtjo Edward Tjörnhammar
    Copy the full SHA
    4fbda79 View commit details
  6. kodiPlugins.advanced-emulator-launcher: init at 0.9.6

    (cherry picked from commit 4f410bf)
    edwtjo committed Jun 15, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    edwtjo Edward Tjörnhammar
    Copy the full SHA
    9377b89 View commit details
  7. kodiPlugins.joystick: init at 1.3.6

    (cherry picked from commit fe0b858)
    edwtjo committed Jun 15, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    edwtjo Edward Tjörnhammar
    Copy the full SHA
    3ad3f64 View commit details
  8. kodiPlugins.steam-controller: init at 0.9.0

    (cherry picked from commit 677f194)
    edwtjo committed Jun 15, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    edwtjo Edward Tjörnhammar
    Copy the full SHA
    6ca6ada View commit details
  9. kodi-retroarch-advanced-launchers: ensure sound has been released

    (cherry picked from commit a66a9ae)
    edwtjo committed Jun 15, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    edwtjo Edward Tjörnhammar
    Copy the full SHA
    3467562 View commit details
84 changes: 84 additions & 0 deletions pkgs/applications/video/kodi/commons.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{ stdenv, fetchurl, fetchFromGitHub, fetchpatch, lib
, unzip, cmake, kodiPlain, steam, libcec_platform, tinyxml
, libusb, pcre-cpp, jsoncpp, libhdhomerun }:

rec {

pluginDir = "/share/kodi/addons";

kodi-platform = stdenv.mkDerivation rec {
project = "kodi-platform";
version = "17.1";
name = "${project}-${version}";

src = fetchFromGitHub {
owner = "xbmc";
repo = project;
rev = "c8188d82678fec6b784597db69a68e74ff4986b5";
sha256 = "1r3gs3c6zczmm66qcxh9mr306clwb3p7ykzb70r3jv5jqggiz199";
};

buildInputs = [ cmake kodiPlain libcec_platform tinyxml ];

};

mkKodiAPIPlugin = { plugin, namespace, version, src, meta, sourceDir ? null, ... }:
stdenv.lib.makeOverridable stdenv.mkDerivation rec {

inherit src meta sourceDir;

name = "kodi-plugin-${plugin}-${version}";

passthru = {
kodiPlugin = pluginDir;
namespace = namespace;
};

dontStrip = true;

installPhase = ''
${if isNull sourceDir then "" else "cd $src/$sourceDir"}
d=$out${pluginDir}/${namespace}
mkdir -p $d
sauce="."
[ -d ${namespace} ] && sauce=${namespace}
cp -R "$sauce/"* $d
'';

};

mkKodiPlugin = mkKodiAPIPlugin;

mkKodiABIPlugin = { plugin, namespace, version, src, meta
, extraBuildInputs ? [], sourceDir ? null, ... }:
stdenv.lib.makeOverridable stdenv.mkDerivation rec {

inherit src meta sourceDir;

name = "kodi-plugin-${plugin}-${version}";

passthru = {
kodiPlugin = pluginDir;
namespace = namespace;
};

dontStrip = true;

buildInputs = [ cmake kodiPlain kodi-platform libcec_platform ]
++ extraBuildInputs;

# disables check ensuring install prefix is that of kodi
cmakeFlags = [
"-DOVERRIDE_PATHS=1"
];

# kodi checks for plugin .so libs existance in the addon folder (share/...)
# and the non-wrapped kodi lib/... folder before even trying to dlopen
# them. Symlinking .so, as setting LD_LIBRARY_PATH is of no use
installPhase = let n = namespace; in ''
make install
ln -s $out/lib/addons/${n}/${n}.so.${version} $out/${pluginDir}/${n}.so
'';

};
}
169 changes: 109 additions & 60 deletions pkgs/applications/video/kodi/plugins.nix
Original file line number Diff line number Diff line change
@@ -1,46 +1,9 @@
{ stdenv, fetchurl, fetchFromGitHub, fetchpatch, lib
, unzip, cmake, kodi, steam, libcec_platform, tinyxml }:
{ stdenv, lib, callPackage, fetchurl, fetchFromGitHub, unzip
, steam, libusb, pcre-cpp, jsoncpp, libhdhomerun }:

let
with (callPackage ./commons.nix {});

pluginDir = "/share/kodi/addons";

kodi-platform = stdenv.mkDerivation rec {
project = "kodi-platform";
version = "17.1";
name = "${project}-${version}";

src = fetchFromGitHub {
owner = "xbmc";
repo = project;
rev = "c8188d82678fec6b784597db69a68e74ff4986b5";
sha256 = "1r3gs3c6zczmm66qcxh9mr306clwb3p7ykzb70r3jv5jqggiz199";
};

buildInputs = [ cmake kodi libcec_platform tinyxml ];
};

mkKodiPlugin = { plugin, namespace, version, src, meta, sourceDir ? null, ... }:
stdenv.lib.makeOverridable stdenv.mkDerivation rec {
inherit src meta sourceDir;
name = "kodi-plugin-${plugin}-${version}";
passthru = {
kodiPlugin = pluginDir;
namespace = namespace;
};
dontStrip = true;
installPhase = ''
${if isNull sourceDir then "" else "cd $src/$sourceDir"}
d=$out${pluginDir}/${namespace}
mkdir -p $d
sauce="."
[ -d ${namespace} ] && sauce=${namespace}
cp -R "$sauce/"* $d
'';
};

in
{
rec {

advanced-launcher = mkKodiPlugin rec {

@@ -72,6 +35,35 @@ in

};

advanced-emulator-launcher = mkKodiPlugin rec {

plugin = "advanced-emulator-launcher";
namespace = "plugin.program.advanced.emulator.launcher";
version = "0.9.6";

src = fetchFromGitHub {
owner = "Wintermute0110";
repo = namespace;
rev = version;
sha256 = "1sv9z77jj6bam6llcnd9b3dgkbvhwad2m1v541rv3acrackms2z2";
};

meta = with stdenv.lib; {
homepage = "http://forum.kodi.tv/showthread.php?tid=287826";
description = "A program launcher for Kodi";
longDescription = ''
Advanced Emulator Launcher is a multi-emulator front-end for Kodi
scalable to collections of thousands of ROMs. Includes offline scrapers
for MAME and No-Intro ROM sets and also supports scrapping ROM metadata
and artwork online. ROM auditing for No-Intro ROMs using No-Intro XML
DATs. Launching of games and standalone applications is also available.
'';
platforms = platforms.all;
maintainers = with maintainers; [ edwtjo ];
};

};

controllers = let
pname = "game-controller";
version = "1.0.3";
@@ -111,11 +103,11 @@ in

plugin = "exodus";
namespace = "plugin.video.exodus";
version = "3.0.5";
version = "3.1.13";

src = fetchurl {
url = "https://offshoregit.com/${plugin}/${namespace}/${namespace}-${version}.zip";
sha256 = "0di34sp6y3v72l6gfhj7cvs1vljs9vf0d0x2giix3jk433cj01j0";
sha256 = "1zyay7cinljxmpzngzlrr4pnk2a7z9wwfdcsk6a4p416iglyggdj";
};

meta = with stdenv.lib; {
@@ -155,18 +147,40 @@ in
};
};

joystick = mkKodiABIPlugin rec {
namespace = "peripheral.joystick";
version = "1.3.6";
plugin = namespace;

src = fetchFromGitHub {
owner = "kodi-game";
repo = namespace;
rev = "5b480ccdd4a87f2ca3283a7b8d1bd69a114af0db";
sha256 = "1zf5zwghx96bqk7bx53qra27lfbgfdi1dsk4s3hwixr8ii72cqpp";
};

meta = with stdenv.lib; {
description = "Binary addon for raw joystick input.";
platforms = platforms.all;
maintainers = with maintainers; [ edwtjo ];
};

extraBuildInputs = [ libusb pcre-cpp ];

};

svtplay = mkKodiPlugin rec {

plugin = "svtplay";
namespace = "plugin.video.svtplay";
version = "4.0.42";
version = "4.0.48";

src = fetchFromGitHub {
name = plugin + "-" + version + ".tar.gz";
owner = "nilzen";
repo = "xbmc-" + plugin;
rev = "83cb52b949930a1b6d2e51a7a0faf9bd69c7fb7d";
sha256 = "0ync2ya4lwmfn6ngg8v0z6bng45whwg280irsn4bam5ca88383iy";
rev = "dc18ad002cd69257611d0032fba91f57bb199165";
sha256 = "0klk1jpjc243ak306k94mag4b4s17w68v69yb8lzzydszqkaqa7x";
};

meta = with stdenv.lib; {
@@ -184,6 +198,28 @@ in

};

steam-controller = mkKodiABIPlugin rec {
namespace = "peripheral.steamcontroller";
version = "0.9.0";
plugin = namespace;

src = fetchFromGitHub {
owner = "kodi-game";
repo = namespace;
rev = "76f640fad4f68118f4fab6c4c3338d13daca7074";
sha256 = "0yqlfdiiymb8z6flyhpval8w3kdc9qv3mli3jg1xn5ac485nxsxh";
};

extraBuildInputs = [ libusb ];

meta = with stdenv.lib; {
description = "Binary addon for steam controller.";
platforms = platforms.all;
maintainers = with maintainers; [ edwtjo ];
};

};

steam-launcher = (mkKodiPlugin rec {

plugin = "steam-launcher";
@@ -233,7 +269,8 @@ in
};
};

pvr-hts = (mkKodiPlugin rec {
pvr-hts = mkKodiABIPlugin rec {

plugin = "pvr-hts";
namespace = "pvr.hts";
version = "3.4.16";
@@ -251,18 +288,30 @@ in
platforms = platforms.all;
maintainers = with maintainers; [ cpages ];
};
}).override {
buildInputs = [ cmake kodi libcec_platform kodi-platform ];

# disables check ensuring install prefix is that of kodi
cmakeFlags = [ "-DOVERRIDE_PATHS=1" ];

# kodi checks for plugin .so libs existance in the addon folder (share/...)
# and the non-wrapped kodi lib/... folder before even trying to dlopen
# them. Symlinking .so, as setting LD_LIBRARY_PATH is of no use
installPhase = ''
make install
ln -s $out/lib/addons/pvr.hts/pvr.hts.so* $out/share/kodi/addons/pvr.hts
'';

};

pvr-hdhomerun = mkKodiABIPlugin rec {

plugin = "pvr-hdhomerun";
namespace = "pvr.hdhomerun";
version = "2.4.7";

src = fetchFromGitHub {
owner = "kodi-pvr";
repo = "pvr.hdhomerun";
rev = "60d89d16dd953d38947e8a6da2f8bb84a0f764ef";
sha256 = "0dvdv0vk2q12nj0i5h51iaypy3i7jfsxjyxwwpxfy82y8260ragy";
};

meta = with stdenv.lib; {
homepage = https://github.com/kodi-pvr/pvr.hdhomerun;
description = "Kodi's HDHomeRun PVR client addon";
platforms = platforms.all;
maintainers = with maintainers; [ titanous ];
};

extraBuildInputs = [ jsoncpp libhdhomerun ];

};
}
34 changes: 34 additions & 0 deletions pkgs/development/libraries/libhdhomerun/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{ stdenv, fetchgit }:

stdenv.mkDerivation {
name = "libhdhomerun-1efbcb";

src = fetchgit {
url = "git://github.com/Silicondust/libhdhomerun.git";
rev = "1efbcb2b87b17a82f2b3d873d1c9cc1c6a3a9b77";
sha256 = "11iyrfs98xb50n9iqnwfphmmnn5w3mq2l9cjjpf8qp29cvs33cgy";
};

patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile --replace "gcc" "cc"
substituteInPlace Makefile --replace "-arch i386" ""
'';

installPhase = let
libSuff = if stdenv.isDarwin then "dylib" else "so";
in ''
mkdir -p $out/{bin,lib,include/hdhomerun}
install -Dm444 libhdhomerun.${libSuff} $out/lib
install -Dm555 hdhomerun_config $out/bin
cp *.h $out/include/hdhomerun
'';

meta = with stdenv.lib; {
description = "Implements the libhdhomerun protocol for use with Silicondust HDHomeRun TV tuners";
homepage = "https://github.com/Silicondust/libhdhomerun";
repositories.git = "https://github.com/Silicondust/libhdhomerun.git";
license = stdenv.lib.licenses.lgpl2;
platforms = stdenv.lib.platforms.unix;
maintainers = [ maintainers.titanous ];
};
}
9 changes: 5 additions & 4 deletions pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix
Original file line number Diff line number Diff line change
@@ -8,8 +8,9 @@ let

script = exec: ''
#!${stdenv.shell}
nohup sh -c "sleep 1 && pkill -SIGSTOP kodi" &
nohup sh -c "${exec} '$@' -f;pkill -SIGCONT kodi"
nohup sh -c "pkill -SIGTSTP kodi" &
# https://forum.kodi.tv/showthread.php?tid=185074&pid=1622750#pid1622750
nohup sh -c "sleep 10 && ${exec} '$@' -f;pkill -SIGCONT kodi"
'';
scriptSh = exec: pkgs.writeScript ("kodi-"+exec.name) (script exec.path);
execs = map (core: rec { name = core.core; path = core+"/bin/retroarch-"+name;}) cores;
@@ -31,8 +32,8 @@ stdenv.mkDerivation rec {
description = "Kodi retroarch advanced launchers";
longDescription = ''
These retroarch launchers are intended to be used with
anglescry advanced launcher for Kodi since device input is
caught by both Kodi and the retroarch process.
advanced (emulation) launcher for Kodi since device input is
otherwise caught by both Kodi and the retroarch process.
'';
license = stdenv.lib.licenses.gpl3;
};
11 changes: 8 additions & 3 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -8248,6 +8248,8 @@ with pkgs;

libharu = callPackage ../development/libraries/libharu { };

libhdhomerun = callPackage ../development/libraries/libhdhomerun { };

libhttpseverywhere = callPackage ../development/libraries/libhttpseverywhere { };

libHX = callPackage ../development/libraries/libHX { };
@@ -15811,15 +15813,20 @@ with pkgs;
plugins = let inherit (lib) optional optionals; in with kodiPlugins;
([]
++ optional (config.kodi.enableAdvancedLauncher or false) advanced-launcher
++ optional (config.kodi.enableAdvancedEmulatorLauncher or false)
advanced-emulator-launcher
++ optionals (config.kodi.enableControllers or false)
(with controllers;
[ default dreamcast gba genesis mouse n64 nes ps snes ])
++ optional (config.kodi.enableExodus or false) exodus
++ optionals (config.kodi.enableHyperLauncher or false)
(with hyper-launcher; [ plugin service pdfreader ])
++ optional (config.kodi.enableJoystick or false) joystick
++ optional (config.kodi.enableSVTPlay or false) svtplay
++ optional (config.kodi.enableSteamController or false) steam-controller
++ optional (config.kodi.enableSteamLauncher or false) steam-launcher
++ optional (config.kodi.enablePVRHTS or false) pvr-hts
++ optional (config.kodi.enablePVRHDHomeRun or false) pvr-hdhomerun
);
};

@@ -15858,9 +15865,7 @@ with pkgs;
};
xbmcPlain = kodiPlain;

kodiPlugins = recurseIntoAttrs (callPackage ../applications/video/kodi/plugins.nix {
kodi = kodiPlain;
});
kodiPlugins = recurseIntoAttrs (callPackage ../applications/video/kodi/plugins.nix {});
xbmcPlugins = kodiPlugins;

kodi = wrapKodi {