push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
requests,
vfs-libarchive,
}:
buildKodiAddon rec {
pname = "a4ksubtitles";
namespace = "service.subtitles.a4ksubtitles";
version = "3.3.0";
src = fetchFromGitHub {
owner = "a4k-openproject";
repo = "a4kSubtitles";
rev = "${namespace}/${namespace}-${version}";
sha256 = "sha256-t6oclFAOsUC+hFtw6wjRh1zl2vQfc7RKblVJpBPfE9w=";
};
propagatedBuildInputs = [
requests
vfs-libarchive
];
meta = with lib; {
homepage = "https://a4k-openproject.github.io/a4kSubtitles/";
description = "Multi-Source Subtitles Addon";
license = licenses.mit;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,27 @@
{
writeShellScript,
nix,
curl,
gzip,
xmlstarlet,
common-updater-scripts,
}:
{ attrPath }:
let
url = "http://mirrors.kodi.tv/addons/omega/addons.xml.gz";
updateScript = writeShellScript "update.sh" ''
set -ex
attrPath=$1
namespace=$(${nix}/bin/nix-instantiate $systemArg --eval -E "with import ./. {}; $attrPath.namespace" | tr -d '"')
version=$(${curl}/bin/curl -s -L ${url} | ${gzip}/bin/gunzip -c | ${xmlstarlet}/bin/xml select -T -t -m "//addons/addon[@id='$namespace']" -v @version)
${common-updater-scripts}/bin/update-source-version "$attrPath" "$version"
'';
in
[
updateScript
attrPath
]

View File

@@ -0,0 +1,33 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
vfs-libarchive,
}:
buildKodiAddon rec {
pname = "archive_tool";
namespace = "script.module.archive_tool";
version = "2.0.3";
src = fetchFromGitHub {
owner = "zach-morris";
repo = "script.module.archive_tool";
rev = version;
sha256 = "0hbkyk59xxfjv6vzfjplahmqxi5564qjlwyq6k8ijy6jjcwnd3p7";
};
propagatedBuildInputs = [
vfs-libarchive
];
passthru = {
pythonPath = "lib";
};
meta = with lib; {
homepage = "https://github.com/zach-morris/script.module.archive_tool";
description = "Set of common python functions to work with the Kodi archive virtual file system (vfs) binary addons";
license = licenses.gpl3Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
dateutil,
typing_extensions,
}:
buildKodiAddon rec {
pname = "arrow";
namespace = "script.module.arrow";
version = "1.2.3";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/script.module.arrow/script.module.arrow-${version}.zip";
sha256 = "sha256-Et+9FJT1dRE1dFOrAQ70HJJcfylyLsiyay9wPJcSOXs=";
};
propagatedBuildInputs = [
dateutil
typing_extensions
];
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.arrow";
};
};
meta = with lib; {
homepage = "https://github.com/razzeee/script.module.arrow";
description = "Better dates & times for Python";
license = licenses.asl20;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
dateutil,
requests,
xbmcswift2,
}:
buildKodiAddon rec {
pname = "arteplussept";
namespace = "plugin.video.arteplussept";
version = "1.4.3";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
hash = "sha256-05k0ijTp0JDtHdxTJ5I8ff47F6LXGP78rInyX0nD7W8=";
};
propagatedBuildInputs = [
dateutil
requests
xbmcswift2
];
passthru = {
updateScript = addonUpdateScript {
attrPath = "kodi.packages.arteplussept";
};
};
meta = with lib; {
homepage = "https://github.com/thomas-ernest/plugin.video.arteplussept";
description = "Watch videos available on Arte+7";
license = licenses.mit;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,24 @@
{
buildKodiAddon,
fetchFromGitHub,
lib,
}:
buildKodiAddon rec {
pname = "bluetooth-manager";
namespace = "script.bluetooth.man";
version = "1.0.4";
src = fetchFromGitHub {
owner = "wastis";
repo = "BluetoothManager";
tag = "v${version}";
hash = "sha256-KKaR7rIkflMYU6EDBEcorHQ3t7jsB4Qe6Ikg+eBblkA=";
};
meta = with lib; {
description = "Addon that allows to manage bluetooth devices from within a Linux based Kodi";
platforms = platforms.all;
maintainers = teams.kodi.members;
license = licenses.gpl3Plus;
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
cacert,
}:
buildKodiAddon rec {
pname = "certifi";
namespace = "script.module.certifi";
version = "2023.5.7";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-NQbjx+k9fnQMYLLMR5+N5NSuDcXEzZjlhGPA3qSmjfI=";
};
patches = [
# Add support for NIX_SSL_CERT_FILE
./env.patch
];
postPatch = ''
# Use our system-wide ca-bundle instead of the bundled one
ln -snvf "${cacert}/etc/ssl/certs/ca-bundle.crt" "lib/certifi/cacert.pem"
'';
propagatedNativeBuildInputs = [
# propagate cacerts setup-hook to set up `NIX_SSL_CERT_FILE`
cacert
];
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.certifi";
};
};
meta = with lib; {
homepage = "https://certifi.io";
description = "Python package for providing Mozilla's CA Bundle";
license = licenses.mpl20;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,86 @@
diff --git a/lib/certifi/core.py b/lib/certifi/core.py
index de02898..c033d20 100644
--- a/lib/certifi/core.py
+++ b/lib/certifi/core.py
@@ -4,15 +4,25 @@ certifi.py
This module returns the installation location of cacert.pem or its contents.
"""
+import os
import sys
+def get_cacert_path_from_environ():
+ path = os.environ.get("NIX_SSL_CERT_FILE", None)
+
+ if path == "/no-cert-file.crt":
+ return None
+
+ return path
+
+
if sys.version_info >= (3, 11):
from importlib.resources import as_file, files
_CACERT_CTX = None
- _CACERT_PATH = None
+ _CACERT_PATH = get_cacert_path_from_environ()
def where() -> str:
# This is slightly terrible, but we want to delay extracting the file
@@ -39,14 +49,16 @@ if sys.version_info >= (3, 11):
return _CACERT_PATH
def contents() -> str:
- return files("certifi").joinpath("cacert.pem").read_text(encoding="ascii")
+ if _CACERT_PATH is not None:
+ return open(_CACERT_PATH, encoding="utf-8").read()
+ return files("certifi").joinpath("cacert.pem").read_text(encoding="utf-8")
elif sys.version_info >= (3, 7):
from importlib.resources import path as get_path, read_text
_CACERT_CTX = None
- _CACERT_PATH = None
+ _CACERT_PATH = get_cacert_path_from_environ()
def where() -> str:
# This is slightly terrible, but we want to delay extracting the
@@ -74,7 +86,9 @@ elif sys.version_info >= (3, 7):
return _CACERT_PATH
def contents() -> str:
- return read_text("certifi", "cacert.pem", encoding="ascii")
+ if _CACERT_PATH is not None:
+ return open(_CACERT_PATH, encoding="utf-8").read()
+ return read_text("certifi", "cacert.pem", encoding="utf-8")
else:
import os
@@ -84,6 +98,8 @@ else:
Package = Union[types.ModuleType, str]
Resource = Union[str, "os.PathLike"]
+ _CACERT_PATH = get_cacert_path_from_environ()
+
# This fallback will work for Python versions prior to 3.7 that lack the
# importlib.resources module but relies on the existing `where` function
# so won't address issues with environments like PyOxidizer that don't set
@@ -102,7 +118,14 @@ else:
def where() -> str:
f = os.path.dirname(__file__)
+ if _CACERT_PATH is not None:
+ return _CACERT_PATH
+
return os.path.join(f, "cacert.pem")
def contents() -> str:
- return read_text("certifi", "cacert.pem", encoding="ascii")
+ if _CACERT_PATH is not None:
+ with open(_CACERT_PATH, encoding="utf-8") as data:
+ return data.read()
+
+ return read_text("certifi", "cacert.pem", encoding="utf-8")

View File

@@ -0,0 +1,31 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "chardet";
namespace = "script.module.chardet";
version = "5.1.0";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-cIQIX6LVAoGf1sBRKWonXJd3XYqGOa5WIUttabV0HeU=";
};
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.chardet";
};
};
meta = with lib; {
homepage = "https://github.com/Freso/script.module.chardet";
description = "Universal encoding detector";
license = licenses.lgpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchFromGitHub,
toKodiAddon,
addonDir,
}:
let
drv = stdenv.mkDerivation rec {
pname = "controller-topology-project";
version = "1.0.7";
src = fetchFromGitHub {
owner = "kodi-game";
repo = "controller-topology-project";
rev = "v${version}";
sha256 = "sha256-LzwMKsoip+ajmmk4qUJynOmhhf3Auivn8Af8VRGWkTA=";
};
postPatch = ''
# remove addons already included in the base kodi package
rm -r addons/game.controller.default
rm -r addons/game.controller.keyboard
rm -r addons/game.controller.mouse
rm -r addons/game.controller.snes
'';
installPhase = ''
runHook preInstall
mkdir -p $out${addonDir}
cp -r addons/* $out${addonDir}
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/kodi-game/controller-topology-project";
description = "Models how controllers connect to and map to each other for all gaming history";
license = with licenses; [ odbl ];
teams = [ teams.kodi ];
};
};
in
toKodiAddon drv

View File

@@ -0,0 +1,40 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
six,
}:
buildKodiAddon rec {
pname = "dateutil";
namespace = "script.module.dateutil";
version = "2.8.2";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-iQnyS0GjYcPbnBDUxmMrmDxHOA3K8RbTVke/HF4d5u4=";
};
propagatedBuildInputs = [
six
];
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.dateutil";
};
};
meta = with lib; {
homepage = "https://dateutil.readthedocs.io/en/stable/";
description = "Extensions to the standard Python datetime module";
license = with licenses; [
asl20
bsd3
];
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "defusedxml";
namespace = "script.module.defusedxml";
version = "0.6.0+matrix.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-jSl7lbFqR6hjZhHzxY69hDbs84LY3B5RYKzXnHou0Qg=";
};
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.defusedxml";
};
};
meta = with lib; {
homepage = "https://github.com/tiran/defusedxml";
description = "Defusing XML bombs and other exploits";
license = licenses.psfl;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
requests,
}:
buildKodiAddon rec {
pname = "formula1";
namespace = "plugin.video.formula1";
version = "2.0.7";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-yz9SB0hiw5JKURGNvAazxazL+bMtfziNXlOLLoGUPOU=";
};
propagatedBuildInputs = [
requests
];
passthru = {
updateScript = addonUpdateScript {
attrPath = "kodi.packages.formula1";
};
};
meta = with lib; {
homepage = "https://github.com/jaylinski/kodi-addon-formula1";
description = "Videos from the Formula 1 website";
license = licenses.mit;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "future";
namespace = "script.module.future";
version = "1.0.0+matrix.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-BsDgCAZuJBRBpe6EmfSynhrXS3ktQRZsEwf9CdF0VCg=";
};
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.future";
};
};
meta = with lib; {
homepage = "https://python-future.org";
description = "Missing compatibility layer between Python 2 and Python 3";
license = licenses.mit;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
dateutil,
requests,
routing,
vfs-libarchive,
archive_tool,
youtube,
infotagger,
}:
buildKodiAddon rec {
pname = "iagl";
namespace = "plugin.program.iagl";
version = "3.0.9";
src = fetchFromGitHub {
owner = "zach-morris";
repo = "plugin.program.iagl";
rev = version;
sha256 = "sha256-b8nO3D/xTnj/5UDshGlIJdiHd75VhIlkrGUi0vkZqG4=";
};
propagatedBuildInputs = [
dateutil
requests
routing
vfs-libarchive
archive_tool
youtube
infotagger
];
meta = with lib; {
homepage = "https://github.com/zach-morris/plugin.program.iagl";
description = "Launch Games from the Internet using Kodi";
license = licenses.gpl3Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "idna";
namespace = "script.module.idna";
version = "3.10.0";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-wFS7rETO+VGeg1MxMEdb/cwVw5/TEoZF2CS3BjkxDlk=";
};
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.idna";
};
};
meta = with lib; {
homepage = "https://github.com/Freso/script.module.idna";
description = "Internationalized Domain Names for Python";
license = licenses.bsd3;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "infotagger";
namespace = "script.module.infotagger";
version = "0.0.8";
src = fetchFromGitHub {
owner = "jurialmunkey";
repo = namespace;
rev = "v${version}";
hash = "sha256-Ns1OjrYLKz4znXRxqUErDLcmC0HBjBFVYI9GFqDVurY=";
};
passthru = {
# Unusual Python path.
pythonPath = "resources/modules";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.infotagger";
};
};
meta = with lib; {
homepage = "https://github.com/jurialmunkey/script.module.infotagger";
description = "Wrapper for new Nexus InfoTagVideo ListItem methods to maintain backwards compatibility";
license = licenses.gpl3Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,69 @@
{
stdenv,
lib,
rel,
addonDir,
buildKodiBinaryAddon,
fetchFromGitHub,
pugixml,
glib,
nspr,
nss,
gtest,
rapidjson,
}:
let
bento4 = fetchFromGitHub {
owner = "xbmc";
repo = "Bento4";
tag = "1.6.0-641-3-${rel}";
hash = "sha256-ycWQvXgr1DQ3Wng73S8i6y6XmcUD/iN8OKfO1czgsnY=";
};
in
buildKodiBinaryAddon rec {
pname = "inputstream-adaptive";
namespace = "inputstream.adaptive";
version = "21.5.13";
src = fetchFromGitHub {
owner = "xbmc";
repo = "inputstream.adaptive";
tag = "${version}-${rel}";
hash = "sha256-XcRg0FtoN7SXRVEBWM9gIlLOMGT3x64s9WD12UJdblw=";
};
extraCMakeFlags = [
"-DENABLE_INTERNAL_BENTO4=ON"
"-DBENTO4_URL=${bento4}"
];
extraNativeBuildInputs = [ gtest ];
extraBuildInputs = [
pugixml
rapidjson
];
extraRuntimeDependencies = [
glib
nspr
nss
(lib.getLib stdenv.cc.cc)
];
extraInstallPhase =
let
n = namespace;
in
''
${lib.optionalString stdenv.hostPlatform.isAarch64 "ln -s $out/lib/addons/${n}/libcdm_aarch64_loader.so $out/${addonDir}/${n}/libcdm_aarch64_loader.so"}
'';
meta = with lib; {
homepage = "https://github.com/xbmc/inputstream.adaptive";
description = "Kodi inputstream addon for several manifest types";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
kodi,
bzip2,
zlib,
}:
buildKodiBinaryAddon rec {
pname = "inputstream-ffmpegdirect";
namespace = "inputstream.ffmpegdirect";
version = "21.3.8";
src = fetchFromGitHub {
owner = "xbmc";
repo = "inputstream.ffmpegdirect";
rev = "${version}-${rel}";
sha256 = "sha256-IgCSEJzu3a2un7FdiZCEVs/boxvIhSNleTPpOCljCZo=";
};
extraBuildInputs = [
bzip2
zlib
kodi.ffmpeg
];
meta = with lib; {
homepage = "https://github.com/xbmc/inputstream.ffmpegdirect/";
description = "InputStream Client for streams that can be opened by either FFmpeg's libavformat or Kodi's cURL";
platforms = platforms.all;
license = licenses.gpl2Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
openssl,
rtmpdump,
zlib,
}:
buildKodiBinaryAddon rec {
pname = "inputstream-rtmp";
namespace = "inputstream.rtmp";
version = "21.1.2";
src = fetchFromGitHub {
owner = "xbmc";
repo = "inputstream.rtmp";
rev = "${version}-${rel}";
sha256 = "sha256-AkpRbYOe30dWDcflCGXxJz8Y+9bQw9ZmZF88ra2c+fc=";
};
extraBuildInputs = [
openssl
rtmpdump
zlib
];
meta = with lib; {
homepage = "https://github.com/xbmc/inputstream.rtmp/";
description = "Client for RTMP streams";
platforms = platforms.all;
license = licenses.gpl2Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
fetchpatch,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "inputstreamhelper";
namespace = "script.module.inputstreamhelper";
version = "0.6.1+matrix.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-v5fRikswmP+KVbxYibD0NbCK8leUnFbya5EtF1FmS0I=";
};
patches = [
(fetchpatch {
url = "https://github.com/emilsvennesson/script.module.inputstreamhelper/commit/af6adc16a0bee4921a827946b004ee070406ae37.patch";
hash = "sha256-901EyVeZUb0EMvxsEza95qFjTOZ7PDYyqHMRawPM5Zs=";
})
];
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.inputstreamhelper";
};
};
meta = with lib; {
homepage = "https://github.com/emilsvennesson/script.module.inputstreamhelper";
description = "Simple Kodi module that makes life easier for add-on developers relying on InputStream based add-ons and DRM playback";
license = licenses.mit;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
infotagger,
requests,
inputstream-adaptive,
inputstreamhelper,
}:
buildKodiAddon rec {
pname = "invidious";
namespace = "plugin.video.invidious";
version = "0.2.6";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/plugin.video.invidious/plugin.video.invidious-${version}+nexus.0.zip";
sha256 = "sha256-XnlnhvtHMh4uQTupW/SSOmaEV8xZrL61/6GoRpyKR0o=";
};
propagatedBuildInputs = [
infotagger
requests
inputstream-adaptive
inputstreamhelper
];
passthru = {
pythonPath = "resources/lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.invidious";
};
};
meta = with lib; {
homepage = "https://github.com/petterreinholdtsen/kodi-invidious-plugin";
description = "Privacy-friendly way of watching YouTube content";
license = licenses.mit;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,67 @@
{
lib,
addonDir,
buildKodiAddon,
fetchFromGitHub,
kodi,
requests,
dateutil,
six,
kodi-six,
signals,
websocket,
}:
let
python = kodi.pythonPackages.python.withPackages (p: with p; [ pyyaml ]);
in
buildKodiAddon rec {
pname = "jellycon";
namespace = "plugin.video.jellycon";
version = "0.8.3";
src = fetchFromGitHub {
owner = "jellyfin";
repo = "jellycon";
rev = "v${version}";
sha256 = "sha256-dCPbPuUtiMhcECd3Aebs3ZGIM6jn6mmCd0rXS+1TQLs=";
};
nativeBuildInputs = [
python
];
prePatch = ''
# ZIP does not support timestamps before 1980 - https://bugs.python.org/issue34097
substituteInPlace build.py \
--replace "with zipfile.ZipFile(f'{target}/{archive_name}', 'w') as z:" "with zipfile.ZipFile(f'{target}/{archive_name}', 'w', strict_timestamps=False) as z:"
'';
buildPhase = ''
${python}/bin/python3 build.py --version=py3
'';
postInstall = ''
cp -v addon.xml $out${addonDir}/$namespace/
'';
propagatedBuildInputs = [
requests
dateutil
six
kodi-six
signals
websocket
];
meta = with lib; {
homepage = "https://github.com/jellyfin/jellycon";
description = "Lightweight Kodi add-on for Jellyfin";
longDescription = ''
JellyCon is a lightweight Kodi add-on that lets you browse and play media
files directly from your Jellyfin server within the Kodi interface. It can
easily switch between multiple user accounts at will.
'';
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,57 @@
{
lib,
addonDir,
buildKodiAddon,
fetchFromGitHub,
kodi,
requests,
dateutil,
six,
kodi-six,
signals,
websocket,
}:
let
python = kodi.pythonPackages.python.withPackages (p: with p; [ pyyaml ]);
in
buildKodiAddon rec {
pname = "jellyfin";
namespace = "plugin.video.jellyfin";
version = "1.1.0";
src = fetchFromGitHub {
owner = "jellyfin";
repo = "jellyfin-kodi";
rev = "v${version}";
sha256 = "sha256-5CJenvNmyNwrlNfF4jPap99oj21T96TeExbod8+KKTA=";
};
nativeBuildInputs = [ python ];
# ZIP does not support timestamps before 1980 - https://bugs.python.org/issue34097
patches = [ ./no-strict-zip-timestamp.patch ];
buildPhase = ''
${python}/bin/python3 build.py --version=py3
'';
postInstall = ''
cp -v addon.xml $out${addonDir}/$namespace/
'';
propagatedBuildInputs = [
requests
dateutil
six
kodi-six
signals
websocket
];
meta = with lib; {
homepage = "https://jellyfin.org/";
description = "Whole new way to manage and view your media library";
license = licenses.gpl3Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,15 @@
diff --git a/build.py b/build.py
index 148441f3..2aa0f1ea 100755
--- a/build.py
+++ b/build.py
@@ -69,7 +69,9 @@ def zip_files(py_version: str, source: str, target: str, dev: bool) -> None:
"""
archive_name = "plugin.video.jellyfin+{}.zip".format(py_version)
- with zipfile.ZipFile("{}/{}".format(target, archive_name), "w") as z:
+ with zipfile.ZipFile(
+ "{}/{}".format(target, archive_name), "w", strict_timestamps=False
+ ) as z:
for root, dirs, files in os.walk(args.source):
for filename in filter(file_filter, files):
file_path = os.path.join(root, filename)

View File

@@ -0,0 +1,32 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
tinyxml,
udev,
}:
buildKodiBinaryAddon rec {
pname = namespace;
namespace = "peripheral.joystick";
version = "20.1.9";
src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
sha256 = "sha256-xJh9Rj+PcxrgGomEsKnQcO/yZDQCnG6gNBwfK2JGuNA=";
};
extraBuildInputs = [
tinyxml
udev
];
meta = with lib; {
description = "Binary addon for raw joystick input";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
requests,
infotagger,
}:
buildKodiAddon rec {
pname = "jurialmunkey";
namespace = "script.module.jurialmunkey";
version = "0.2.29";
src = fetchFromGitHub {
owner = "jurialmunkey";
repo = namespace;
rev = "v${version}";
hash = "sha256-qVS3vwYFicDXZ8ls/5MfZL8iwmz+CAwB6ZWUV4Zjmbw=";
};
propagatedBuildInputs = [
requests
infotagger
];
passthru = {
pythonPath = "resources/modules";
};
meta = with lib; {
homepage = "https://github.com/jurialmunkey/script.module.jurialmunkey/tree/main";
description = "Common code required by TMDbHelper and other related jurialmunkey add-ons";
license = licenses.gpl3Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
defusedxml,
kodi-six,
}:
buildKodiAddon rec {
pname = "keymap";
namespace = "script.keymap";
version = "1.3.2";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-y9bREG1fGY6TJYW4xMUBbsAp6DSzb78tY1+iyUrGjgQ=";
};
propagatedBuildInputs = [
defusedxml
kodi-six
];
passthru = {
updateScript = addonUpdateScript {
attrPath = "kodi.packages.keymap";
};
};
meta = with lib; {
homepage = "https://github.com/tamland/xbmc-keymap-editor";
description = "GUI for configuring mappings for remotes, keyboard and other inputs supported by Kodi";
license = licenses.gpl3Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,26 @@
{
stdenv,
fetchFromGitHub,
cmake,
kodi,
libcec_platform,
tinyxml,
}:
stdenv.mkDerivation {
pname = "kodi-platform";
version = "17.1";
src = fetchFromGitHub {
owner = "xbmc";
repo = "kodi-platform";
rev = "c8188d82678fec6b784597db69a68e74ff4986b5";
sha256 = "1r3gs3c6zczmm66qcxh9mr306clwb3p7ykzb70r3jv5jqggiz199";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
kodi
libcec_platform
tinyxml
];
}

View File

@@ -0,0 +1,32 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "kodi-six";
namespace = "script.module.kodi-six";
version = "0.1.3.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-nWz5CPoE0uVsZvWjI4q6y4ZKUnraTjTXLSJ1mK4YopI=";
};
passthru = {
pythonPath = "libs";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.kodi-six";
};
};
meta = with lib; {
homepage = "https://github.com/romanvm/kodi.six";
description = "Wrappers around Kodi Python API for seamless Python 2/3 compatibility";
license = licenses.gpl3Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
buildKodiBinaryAddon,
fetchFromGitHub,
libretro,
twenty-fortyeight,
}:
buildKodiBinaryAddon rec {
pname = "libretro-2048";
namespace = "game.libretro.2048";
version = "1.0.0.136";
src = fetchFromGitHub {
owner = "kodi-game";
repo = "game.libretro.2048";
rev = "${version}-Nexus";
hash = "sha256-cIo56ZGansBlAj6CFw51UOYJUivN9n1qhVTWAX9c5Tc=";
};
extraCMakeFlags = [
"-D2048_LIB=${twenty-fortyeight}/lib/retroarch/cores/2048_libretro.so"
];
extraBuildInputs = [ twenty-fortyeight ];
propagatedBuildInputs = [
libretro
];
meta = with lib; {
homepage = "https://github.com/kodi-game/game.libretro.2048";
description = "2048 GameClient for Kodi";
platforms = platforms.all;
license = licenses.publicDomain;
maintainers = with maintainers; [ kazenyuk ];
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
buildKodiBinaryAddon,
fetchFromGitHub,
libretro,
fuse,
}:
buildKodiBinaryAddon rec {
pname = "libretro-fuse";
namespace = "game.libretro.fuse";
version = "1.6.0.34";
src = fetchFromGitHub {
owner = "kodi-game";
repo = "game.libretro.fuse";
rev = "${version}-Nexus";
hash = "sha256-MimwEV7YD6pMshxqbKTVbLDsPmMbqSy4HPnxwmKswpc=";
};
extraCMakeFlags = [
"-DFUSE_LIB=${fuse}/lib/retroarch/cores/fuse_libretro.so"
];
extraBuildInputs = [ fuse ];
propagatedBuildInputs = [
libretro
];
meta = with lib; {
homepage = "https://github.com/kodi-game/game.libretro.fuse";
description = "Sinclair - ZX Spectrum (Fuse) GameClient for Kodi";
platforms = platforms.all;
license = licenses.gpl3Only;
maintainers = with maintainers; [ kazenyuk ];
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
buildKodiBinaryAddon,
fetchFromGitHub,
libretro,
genesis-plus-gx,
}:
buildKodiBinaryAddon rec {
pname = "kodi-libretro-genplus";
namespace = "game.libretro.genplus";
version = "1.7.4.35";
src = fetchFromGitHub {
owner = "kodi-game";
repo = "game.libretro.genplus";
rev = "${version}-Matrix";
sha256 = "sha256-F3bt129lBZKlDtp7X0S0q10T9k9C2zNeHG+yIP3818Q=";
};
extraCMakeFlags = [
"-DGENPLUS_LIB=${genesis-plus-gx}/lib/retroarch/cores/genesis_plus_gx_libretro.so"
];
extraBuildInputs = [ genesis-plus-gx ];
propagatedBuildInputs = [
libretro
];
meta = with lib; {
homepage = "https://github.com/kodi-game/game.libretro.genplus";
description = "Genesis Plus GX GameClient for Kodi";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
libretro,
gw,
}:
buildKodiBinaryAddon rec {
pname = "libretro-gw";
namespace = "game.libretro.gw";
version = "1.6.3.34";
src = fetchFromGitHub {
owner = "kodi-game";
repo = "game.libretro.gw";
rev = "${version}-${rel}";
hash = "sha256-HYXR3cEjbdKgKy42nq36Ii3UyxRVuQVROQjyaxSp5Ro=";
};
extraCMakeFlags = [
"-DGW_LIB=${gw}/lib/retroarch/cores/gw_libretro.so"
];
extraBuildInputs = [ gw ];
propagatedBuildInputs = [
libretro
];
meta = with lib; {
homepage = "https://github.com/kodi-game/game.libretro.gw";
description = "Game and Watch for Kodi";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
buildKodiBinaryAddon,
fetchFromGitHub,
libretro,
mgba,
}:
buildKodiBinaryAddon rec {
pname = "kodi-libretro-mgba";
namespace = "game.libretro.mgba";
version = "0.10.0.35";
src = fetchFromGitHub {
owner = "kodi-game";
repo = "game.libretro.mgba";
rev = "${version}-Matrix";
sha256 = "sha256-lxpj6Y34apYcE22q4W3Anhigp79r4RgiJ36DbES1kzU=";
};
extraCMakeFlags = [
"-DMGBA_LIB=${mgba}/lib/retroarch/cores/mgba_libretro.so"
];
extraBuildInputs = [ mgba ];
propagatedBuildInputs = [
libretro
];
meta = with lib; {
homepage = "https://github.com/kodi-game/game.libretro.mgba";
description = "mGBA for Kodi";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
libretro,
nestopia,
}:
buildKodiBinaryAddon rec {
pname = "libretro-nestopia";
namespace = "game.libretro.nestopia";
version = "1.52.0.41";
src = fetchFromGitHub {
owner = "kodi-game";
repo = "game.libretro.nestopia";
rev = "${version}-${rel}";
sha256 = "sha256-DmBO+HcfIBcz7p16dND09iwXWeObtU/doo/mJ0IZGGg=";
};
extraCMakeFlags = [
"-DNESTOPIA_LIB=${nestopia}/lib/retroarch/cores/nestopia_libretro.so"
];
extraBuildInputs = [ nestopia ];
propagatedBuildInputs = [
libretro
];
meta = with lib; {
homepage = "https://github.com/kodi-game/game.libretro.nestopia";
description = "Nintendo - NES / Famicom (Nestopia UE) GameClient for Kodi";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
buildKodiBinaryAddon,
fetchFromGitHub,
libretro,
snes9x,
}:
buildKodiBinaryAddon rec {
pname = "kodi-libretro-snes9x";
namespace = "game.libretro.snes9x";
version = "1.61.0.34";
src = fetchFromGitHub {
owner = "kodi-game";
repo = "game.libretro.snes9x";
rev = "${version}-Matrix";
sha256 = "sha256-LniZf8Gae4+4Rgc9OGhMCkOI3IA7CPjVrN/gbz9te38=";
};
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;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
tinyxml,
}:
buildKodiBinaryAddon rec {
pname = "libretro";
namespace = "game.libretro";
version = "20.1.0";
src = fetchFromGitHub {
owner = "kodi-game";
repo = "game.libretro";
rev = "${version}-${rel}";
sha256 = "sha256-RwaLGAJt13PLKy45HU64TvQFyY532WWq2YX34Eyu+6o=";
};
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;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
requests,
routing,
}:
buildKodiAddon rec {
pname = "media.ccc.de";
namespace = "plugin.video.media-ccc-de";
version = "0.3.0+matrix.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/plugin.video.media-ccc-de/plugin.video.media-ccc-de-${version}.zip";
hash = "sha256-T8J2HtPVDfaPU0gZEa0xVBzwjNInxkRFCCSxS53QhmU=";
};
propagatedBuildInputs = [
requests
routing
];
passthru = {
updateScript = addonUpdateScript {
attrPath = "kodi.packages.mediacccde";
};
};
meta = with lib; {
homepage = "https://github.com/voc/plugin.video.media-ccc-de/";
description = "media.ccc.de for Kodi";
license = licenses.mit;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
myconnpy,
}:
buildKodiAddon rec {
pname = "mediathekview";
namespace = "plugin.video.mediathekview";
version = "1.0.9";
src = fetchFromGitHub {
owner = pname;
repo = namespace;
rev = "release-${version}";
hash = "sha256-XYyocXFTiYO7Ar0TtxjpCAy2Ywtnwb8BTxdKxwDWm4Y=";
};
propagatedBuildInputs = [
myconnpy
];
meta = with lib; {
homepage = "https://github.com/mediathekview/plugin.video.mediathekview";
description = "Access media libraries of German speaking broadcasting stations";
license = licenses.mit;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "myconnpy";
namespace = "script.module.myconnpy";
version = "8.0.33";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-NlLMq9RAdWu8rVsMc0FDe1HmQiVp5T7iBXbIH7HB5bI=";
};
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.myconnpy";
};
};
meta = with lib; {
homepage = "http://dev.mysql.com/doc/connector-python/en/index.html";
description = "MySQL Connector/Python";
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
signals,
inputstream-adaptive,
inputstreamhelper,
requests,
myconnpy,
}:
buildKodiAddon rec {
pname = "netflix";
namespace = "plugin.video.netflix";
version = "1.23.5";
src = fetchFromGitHub {
owner = "CastagnaIT";
repo = namespace;
rev = "v${version}";
hash = "sha256-IIRut99AH08Z3udTkzUf2wz7dQMA94dOnfROm7iM9RM=";
};
propagatedBuildInputs = [
signals
inputstream-adaptive
inputstreamhelper
requests
myconnpy
];
meta = with lib; {
homepage = "https://github.com/CastagnaIT/plugin.video.netflix";
description = "Netflix VOD Services Add-on";
license = licenses.mit;
maintainers = [ maintainers.pks ];
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
inputstream-adaptive,
inputstreamhelper,
routing,
}:
buildKodiAddon rec {
pname = "orftvthek";
namespace = "plugin.video.orftvthek";
version = "1.0.2+matrix.1";
src = fetchFromGitHub {
owner = "s0faking";
repo = namespace;
rev = version;
sha256 = "sha256-bCVsR7lH0REJmG3OKU8mRRvw/PhSrLfhufmVBmw05+k=";
};
propagatedBuildInputs = [
# Needed for content decryption with Widevine.
inputstream-adaptive
inputstreamhelper
routing
];
meta = with lib; {
homepage = "https://github.com/s0faking/plugin.video.orftvthek";
description = "Addon for accessing the Austrian ORF ON streaming service";
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
}:
buildKodiAddon rec {
pname = "osmc-skin";
namespace = "skin.osmc";
version = "20.1.0";
src = fetchFromGitHub {
owner = "osmc";
repo = namespace;
rev = "v20.1.0-August-update";
sha256 = "E/+gC7NlVRMaymeYMBO39/+rs0blDjr2zIROr24ekzQ=";
};
meta = with lib; {
homepage = "https://github.com/osmc/skin.osmc";
description = "Default skin for OSMC";
platforms = platforms.all;
maintainers = [ ];
license = licenses.cc-by-nc-sa-30;
broken = true; # no release for kodi 21
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
}:
buildKodiAddon rec {
pname = "pdfreader";
namespace = "plugin.image.pdf";
version = "2.0.3";
src = fetchFromGitHub {
owner = "i96751414";
repo = "plugin.image.pdfreader";
rev = "v${version}";
sha256 = "sha256-J93poR5VO9fAgNCEGftJVYnpXOsJSxnhHI6TAJZ2LeI=";
};
passthru.pythonPath = "lib/api";
meta = with lib; {
homepage = "https://forum.kodi.tv/showthread.php?tid=187421";
description = "Comic book reader";
license = licenses.gpl2Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
addonDir,
buildKodiAddon,
fetchFromGitHub,
addonUpdateScript,
kodi-six,
six,
requests,
}:
buildKodiAddon rec {
pname = "plex";
namespace = "script.plex";
version = "0.7.9-rev4";
src = fetchFromGitHub {
owner = "pannal";
repo = "plex-for-kodi";
rev = "v${version}";
sha256 = "sha256-rNxTz3SKHHBm0WDCoZ/foJN2pBBiyI3a/tOdQdOCuXA=";
};
# Plex for Kodi writes to its own directory by default, needs to be patched to a non-store path.
# Once https://github.com/pannal/plex-for-kodi/pull/219 is merged, this can be replaced with a smaller patch that just sets the environment variable INSTALLATION_DIR_AVOID_WRITE, e.g. adding to main.py:
# import os; os.environ("INSTALLATION_DIR_AVOID_WRITE") = True
patches = [ ./plex-template-dir.patch ];
propagatedBuildInputs = [
six
requests
kodi-six
];
passthru = {
updateScript = addonUpdateScript {
attrPath = "kodi.packages.plex";
};
};
postInstall = ''
mv /build/source/addon.xml $out${addonDir}/${namespace}/
'';
meta = with lib; {
homepage = "https://www.plex.tv";
description = "Unofficial Plex for Kodi add-on";
license = licenses.gpl2Only;
maintainers = teams.kodi.members;
};
}

View File

@@ -0,0 +1,79 @@
diff --git a/lib/_included_packages/plexnet/gdm.py b/lib/_included_packages/plexnet/gdm.py
index ccc540ae..3dce02a3 100644
--- a/lib/_included_packages/plexnet/gdm.py
+++ b/lib/_included_packages/plexnet/gdm.py
@@ -28,7 +28,7 @@ class GDMDiscovery(object):
from . import plexapp
return util.INTERFACE.getPreference("gdm_discovery", True) and self.thread and self.thread.is_alive()
- '''
+ r'''
def discover(self):
# Only allow discovery if enabled and not currently running
self._close = False
diff --git a/lib/templating/core.py b/lib/templating/core.py
index 30a53392..e0249e1d 100644
--- a/lib/templating/core.py
+++ b/lib/templating/core.py
@@ -7,6 +7,7 @@ from kodi_six import xbmcvfs, xbmc
from ibis.context import ContextDict
from lib.logging import log as LOG, log_error as ERROR
from .util import deep_update
+from ..util import PROFILE
from lib.os_utils import fast_iglob
from .filters import *
@@ -59,11 +60,22 @@ class TemplateEngine(object):
TEMPLATES = None
def init(self, target_dir, template_dir, custom_template_dir):
- self.target_dir = target_dir
+ # Redirect template write target_dir to writable addon_data
+ writable_base = os.path.join(PROFILE, "resources/skins/Main/1080i")
+ os.makedirs(writable_base, exist_ok=True)
+ # Link media dir into addon dir, so templates can access it via relative path
+ link_path = os.path.join(PROFILE, "resources/skins/Main/media")
+ if not os.path.exists(link_path):
+ os.symlink(
+ os.path.join(os.path.dirname(target_dir), "media"),
+ link_path,
+ True
+ )
+ self.target_dir = writable_base
self.template_dir = template_dir
self.custom_template_dir = custom_template_dir
self.get_available_templates()
- paths = [custom_template_dir, template_dir]
+ paths = [custom_template_dir, self.template_dir]
LOG("Looking for templates in: {}", paths)
self.prepare_loader(paths)
diff --git a/lib/windows/kodigui.py b/lib/windows/kodigui.py
index be7ef154..e8cc09b9 100644
--- a/lib/windows/kodigui.py
+++ b/lib/windows/kodigui.py
@@ -4,6 +4,7 @@ from __future__ import absolute_import
import threading
import time
import traceback
+import os
from kodi_six import xbmc
from kodi_six import xbmcgui
@@ -41,13 +42,14 @@ class BaseFunctions(object):
@classmethod
def open(cls, **kwargs):
- window = cls(cls.xmlFile, cls.path, cls.theme, cls.res, **kwargs)
+ window = cls(cls.xmlFile, util.PROFILE, cls.theme, cls.res, **kwargs)
window.modal()
return window
@classmethod
def create(cls, show=True, **kwargs):
- window = cls(cls.xmlFile, cls.path, cls.theme, cls.res, **kwargs)
+ window = cls(cls.xmlFile, util.PROFILE, cls.theme, cls.res, **kwargs)
+
if show:
window.show()
if xbmcgui.getCurrentWindowId() < 13000:

View File

@@ -0,0 +1,32 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "plugin-cache";
namespace = "script.common.plugin.cache";
version = "3.0.0";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-5QcMNmWOEw2C26OXlvAvxqDxTpjIMBhwmaIFwVgHuIU=";
};
passthru = {
pythonPath = "resources/lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.plugin-cache";
};
};
meta = with lib; {
homepage = "https://github.com/anxdpanic/script.common.plugin.cache";
description = "Common plugin cache";
license = licenses.gpl3Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
jsoncpp,
libhdhomerun,
}:
buildKodiBinaryAddon rec {
pname = "pvr-hdhomerun";
namespace = "pvr.hdhomerun";
version = "21.0.2";
src = fetchFromGitHub {
owner = "kodi-pvr";
repo = "pvr.hdhomerun";
rev = "${version}-${rel}";
sha256 = "sha256-wgKMt3ufvOh08nwZTGvDGoJ0U+aUzSWJptCNRiRW4B0=";
};
extraBuildInputs = [
jsoncpp
libhdhomerun
];
meta = with lib; {
homepage = "https://github.com/kodi-pvr/pvr.hdhomerun";
description = "Kodi's HDHomeRun PVR client addon";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
}:
buildKodiBinaryAddon rec {
pname = "pvr-hts";
namespace = "pvr.hts";
version = "21.2.6";
src = fetchFromGitHub {
owner = "kodi-pvr";
repo = "pvr.hts";
rev = "${version}-${rel}";
sha256 = "sha256-opxNgin+Sz/Nb9IGZ+OFrCzbDc4FXl2LaNKUu5LAgFM=";
};
meta = with lib; {
homepage = "https://github.com/kodi-pvr/pvr.hts";
description = "Kodi's Tvheadend HTSP client addon";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
xz,
pugixml,
zlib,
inputstream-adaptive,
inputstream-ffmpegdirect,
inputstream-rtmp,
}:
buildKodiBinaryAddon rec {
pname = "pvr-iptvsimple";
namespace = "pvr.iptvsimple";
version = "21.10.2";
src = fetchFromGitHub {
owner = "kodi-pvr";
repo = "pvr.iptvsimple";
rev = "${version}-${rel}";
sha256 = "sha256-bw0rAEn8R44n5Nzc9ni6IGaG/Bxry6GSyWcT6BdgLz8=";
};
extraBuildInputs = [
xz
pugixml
zlib
];
propagatedBuildInputs = [
inputstream-adaptive
inputstream-ffmpegdirect
inputstream-rtmp
];
meta = with lib; {
homepage = "https://github.com/kodi-pvr/pvr.iptvsimple";
description = "Kodi's IPTV Simple client addon";
platforms = platforms.all;
license = licenses.gpl2Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
libGL,
}:
buildKodiBinaryAddon rec {
pname = "pvr-vdr-vnsi";
namespace = "pvr.vdr.vnsi";
version = "21.1.3";
src = fetchFromGitHub {
owner = "kodi-pvr";
repo = "pvr.vdr.vnsi";
rev = "${version}-${rel}";
sha256 = "sha256-V/ICEK006Zs4mipywAbRl8ZdezsprCgdC2WYtc/cAAY=";
};
extraBuildInputs = [ libGL ];
meta = with lib; {
homepage = "https://github.com/kodi-pvr/pvr.vdr.vnsi";
description = "Kodi's VDR VNSI PVR client addon";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
requests,
}:
buildKodiAddon rec {
pname = "radioparadise";
namespace = "script.radioparadise";
version = "2.2.0";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/script.radioparadise/script.radioparadise-${version}.zip";
sha256 = "sha256-tZb/DW9wJRYWPqH/wuER1lRgI9ePWFBmuqdI6goDrbo=";
};
propagatedBuildInputs = [
requests
];
passthru = {
pythonPath = "resources/lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.radioparadise";
};
};
meta = with lib; {
homepage = "https://github.com/alxndr42/script.radioparadise";
description = "Radio Paradise addon for Kodi";
license = licenses.gpl3Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
inputstreamhelper,
plugin-cache,
}:
buildKodiAddon rec {
pname = "raiplay";
namespace = "plugin.video.raitv";
version = "4.1.2";
propagatedBuildInputs = [
plugin-cache
inputstreamhelper
];
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-9aR1kkl+0+nhP0bOTnaKCgSfuPvJzX5TWHU0WJZIvSM=";
};
passthru = {
updateScript = addonUpdateScript {
attrPath = "kodi.packages.raiplay";
};
};
meta = with lib; {
homepage = "https://github.com/maxbambi/plugin.video.raitv/";
description = "Live radio and TV channels, latest 7 days of programming, broadcast archive, news";
license = licenses.gpl3Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
requests,
}:
buildKodiAddon rec {
pname = "requests-cache";
namespace = "script.module.requests-cache";
version = "0.5.2+matrix.2";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-6M/v/ghS2TnSZhG8bREjxfEfcfLOmvA6hgsa7JUk9Dk=";
};
propagatedBuildInputs = [
requests
];
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.requests-cache";
};
};
meta = with lib; {
homepage = "https://github.com/reclosedev/requests-cache";
description = "Persistent cache for requests library";
license = licenses.bsd2;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
certifi,
chardet,
idna,
urllib3,
}:
buildKodiAddon rec {
pname = "requests";
namespace = "script.module.requests";
version = "2.31.0";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-05BSD5aoN2CTnjqaSKYMb93j5nIfLvpJHyeQsK++sTw=";
};
propagatedBuildInputs = [
certifi
chardet
idna
urllib3
];
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.requests";
};
};
meta = with lib; {
homepage = "http://python-requests.org";
description = "Python HTTP for Humans";
license = licenses.asl20;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,25 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
}:
buildKodiAddon rec {
pname = "robotocjksc";
namespace = "resource.font.robotocjksc";
version = "0.0.3";
src = fetchFromGitHub {
owner = "jurialmunkey";
repo = namespace;
rev = "v${version}";
hash = "sha256-s/h/KKlGYGMvf7RdI9ONk4S+NCzlaDX5w3CdNfbC2KE=";
};
meta = with lib; {
homepage = "https://github.com/jurialmunkey/resource.font.robotocjksc";
description = "Roboto CJKSC fonts";
license = licenses.asl20;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "routing";
namespace = "script.module.routing";
version = "0.2.3+matrix.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-piPmY8Q3NyIeImmkYhDwmQhBiwwcV0X532xV1DogF+I=";
};
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.routing";
};
};
meta = with lib; {
homepage = "https://github.com/tamland/kodi-plugin-routing";
description = "Routing module for kodi plugins";
license = licenses.gpl3Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
pkg-config,
glm,
libGL,
}:
buildKodiBinaryAddon rec {
pname = "screensaver-asteroids";
namespace = "screensaver.asteroids";
version = "21.0.2";
src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-cepo7amJn6y1J9hVSt35VgOz/ixT7l/UfjtmHOajBrw=";
};
extraNativeBuildInputs = [ pkg-config ];
extraBuildInputs = [
glm
libGL
];
meta = with lib; {
homepage = "https://github.com/xbmc/screensaver.asteroids";
description = "Screensaver that plays Asteroids";
license = licenses.gpl2Plus;
platforms = platforms.all;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
kodi,
inputstreamhelper,
requests,
}:
buildKodiAddon rec {
pname = "sendtokodi";
namespace = "plugin.video.sendtokodi";
version = "0.9.924";
src = fetchFromGitHub {
owner = "firsttris";
repo = "plugin.video.sendtokodi";
tag = "v${version}";
hash = "sha256-ycp5/NbRX2rcRRpbpX6LlplyxdfoIwCw39EyQDcyzOU=";
};
patches = [
# Use yt-dlp, only. This removes the ability to use youtube_dl, which is
# unmaintained and considered vulnerable (see CVE-2024-38519).
./use-yt-dlp-only.patch
];
propagatedBuildInputs = [
inputstreamhelper
requests
];
postPatch = ''
# Remove youtube-dl, which is unmaintained and vulnerable.
rm -r lib/youtube_dl lib/youtube_dl_version
# Replace yt-dlp with our own packaged version thereof.
rm -r lib/yt_dlp
echo "${lib.strings.getVersion kodi.pythonPackages.yt-dlp}" >lib/yt_dlp_version
ln -s ${kodi.pythonPackages.yt-dlp}/${kodi.pythonPackages.python.sitePackages}/yt_dlp lib/
'';
meta = with lib; {
homepage = "https://github.com/firsttris/plugin.video.sendtokodi";
description = "Plays various stream sites on Kodi using yt-dlp";
license = licenses.mit;
maintainers = [ maintainers.pks ];
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,18 @@
diff --git a/service.py b/service.py
index 5d588682..99123b4b 100644
--- a/service.py
+++ b/service.py
@@ -323,12 +323,7 @@ if not sys.argv[2]:
xbmcaddon.Addon().openSettings()
exit()
-# Use the chosen resolver while forcing to use youtube_dl on legacy python 2 systems (dlp is python 3.6+)
-if xbmcplugin.getSetting(int(sys.argv[1]),"resolver") == "0" or sys.version_info[0] == 2:
- from youtube_dl import YoutubeDL
-else:
- # import lib.yt_dlp as yt_dlp
- from yt_dlp import YoutubeDL
+from yt_dlp import YoutubeDL
# patch broken strptime (see above)
patch_strptime()

View File

@@ -0,0 +1,31 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "signals";
namespace = "script.module.addon.signals";
version = "0.0.6+matrix.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-WsLR7iUh5F+LXMISBpWx71dLAtg/AMYF6BsiyKZakuE=";
};
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.signals";
};
};
meta = with lib; {
homepage = "https://github.com/ruuk/script.module.addon.signals";
description = "Provides signal/slot mechanism for inter-addon communication";
license = licenses.lgpl21Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "simplecache";
namespace = "script.module.simplecache";
version = "2.0.2";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-xdOBIi99nspcDIKkjxcW1r/BqL8O9NxdDViTuvMtUmo=";
};
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.simplecache";
};
};
meta = with lib; {
homepage = "https://github.com/kodi-community-addons/script.module.simplecache";
description = "Simple object cache for Kodi addons";
license = licenses.asl20;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "simplejson";
namespace = "script.module.simplejson";
version = "3.19.1+matrix.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-RJy75WAr0XmXnSrPjqKhFjWJnWo3c5IEtUGumcE/mRo=";
};
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.simplejson";
};
};
meta = with lib; {
homepage = "https://github.com/simplejson/simplejson";
description = "Simple, fast, extensible JSON encoder/decoder for Python";
license = licenses.mit;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "six";
namespace = "script.module.six";
version = "1.16.0+matrix.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-d6BNpnTg6K7NPX3uWp5X0rog33C+B7YoAtLH/CrUYno=";
};
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.six";
};
};
meta = with lib; {
homepage = "https://pypi.org/project/six/";
description = "Python 2 and 3 compatibility utilities";
license = licenses.mit;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
requests,
inputstreamhelper,
simplecache,
}:
buildKodiAddon rec {
pname = "skyvideoitalia";
namespace = "plugin.video.skyvideoitalia";
version = "1.0.4";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-ciLtqT++6bn7la4xRVvlRwzbbUUUPN5WU35rJpR4l+w=";
};
propagatedBuildInputs = [
requests
inputstreamhelper
simplecache
];
passthru = {
updateScript = addonUpdateScript {
attrPath = "kodi.packages.skyvideoitalia";
};
};
meta = with lib; {
homepage = "https://www.github.com/nixxo/plugin.video.skyvideoitalia";
description = "Show video content from the website of Sky Italia (video.sky.it). News, sport, entertainment and much more";
license = licenses.gpl3Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "somafm";
namespace = "plugin.audio.somafm";
version = "2.0.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/plugin.audio.somafm/plugin.audio.somafm-${version}.zip";
sha256 = "sha256-auPLm7QFabU4tXJPjTl17KpE+lqWM2Edbd2HrXPRx40=";
};
passthru = {
pythonPath = "resources/lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.somafm";
};
};
meta = with lib; {
homepage = "https://github.com/Soma-FM-Kodi-Add-On/plugin.audio.somafm";
description = "SomaFM addon for Kodi";
license = licenses.gpl3Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
six,
requests,
}:
buildKodiAddon rec {
pname = "sponsorblock";
namespace = "script.service.sponsorblock";
version = "0.5.0";
src = fetchFromGitHub {
owner = "siku2";
repo = namespace;
rev = "v${version}";
hash = "sha256-IBgh2kdPgCy+HHrR7UZxTgjF1LR77ABGlUp3PgaobNM=";
};
propagatedBuildInputs = [
six
requests
];
passthru = {
pythonPath = "resources/lib";
};
meta = with lib; {
homepage = "https://github.com/siku2/script.service.sponsorblock";
description = "Port of SponsorBlock for Invidious and YouTube Plugin";
license = licenses.mit;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
buildKodiBinaryAddon,
fetchFromGitHub,
libusb1,
}:
buildKodiBinaryAddon rec {
pname = namespace;
namespace = "peripheral.steamcontroller";
version = "20.0.2";
src = fetchFromGitHub {
owner = "kodi-game";
repo = namespace;
rev = "b3174673c6feb34325975b6c007581c39bf3e4a5";
sha256 = "sha256-Q+eJfbD4NpAPANm9Mx9/pD29L5tdS4gxhQqNufufYdw=";
};
extraBuildInputs = [ libusb1 ];
meta = with lib; {
description = "Binary addon for steam controller";
platforms = platforms.all;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
steam,
which,
xdotool,
dos2unix,
wmctrl,
}:
buildKodiAddon {
pname = "steam-launcher";
namespace = "script.steam.launcher";
version = "3.5.1";
src = fetchFromGitHub rec {
owner = "teeedubb";
repo = owner + "-xbmc-repo";
rev = "d5cea4b590b0ff08ac169b757946b7cb5145b983";
sha256 = "sha256-arBMMOoHQuHRcJ7eXD1jvA45Svei7c0srcBZkdAzqY0=";
};
propagatedBuildInputs = [
steam
which
xdotool
];
postInstall = ''
substituteInPlace $out/share/kodi/addons/script.steam.launcher/resources/main.py \
--replace "\"which\"" "\"${which}/bin/which\"" \
--replace "\"xdotool\"" "\"${xdotool}/bin/xdotool\"" \
--replace "\"wmctrl\"" "\"${wmctrl}/bin/wmctrl\""
${dos2unix}/bin/dos2unix $out/share/kodi/addons/script.steam.launcher/resources/scripts/steam-launcher.sh
'';
meta = with lib; {
homepage = "https://forum.kodi.tv/showthread.php?tid=157499";
description = "Launch Steam in Big Picture Mode from Kodi";
longDescription = ''
This add-on will close/minimise Kodi, launch Steam in Big
Picture Mode and when Steam BPM is exited (either by quitting
Steam or returning to the desktop) Kodi will
restart/maximise. Running pre/post Steam scripts can be
configured via the addon.
'';
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
requests,
requests-cache,
routing,
}:
buildKodiAddon rec {
pname = "steam-library";
namespace = "plugin.program.steam.library";
version = "0.9.0";
src = fetchFromGitHub {
owner = "aanderse";
repo = namespace;
rev = "v${version}";
sha256 = "sha256-LVdFih0n/lkjyaYf8jw0IFlcDiXXOtUH2N9OduV1H9Q=";
};
propagatedBuildInputs = [
requests
requests-cache
routing
];
meta = with lib; {
homepage = "https://github.com/aanderse/plugin.program.steam.library";
description = "View your entire Steam library right from Kodi";
license = licenses.gpl3Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
}:
buildKodiAddon rec {
pname = "svtplay";
namespace = "plugin.video.svtplay";
version = "5.1.21";
src = fetchFromGitHub {
owner = "nilzen";
repo = "xbmc-" + pname;
rev = "v${version}";
sha256 = "sha256-CZtBUqFaKtMmKcpfBQp0Mb8sVvpCTkqcpfdYe41YSJs=";
};
meta = with lib; {
homepage = "https://forum.kodi.tv/showthread.php?tid=67110";
description = "Watch content from SVT Play";
longDescription = ''
With this addon you can stream content from SVT Play
(svtplay.se). The plugin fetches the video URL from the SVT
Play website and feeds it to the Kodi video player. HLS (m3u8)
is the preferred video format by the plugin.
'';
platforms = platforms.all;
license = licenses.gpl3Plus;
teams = [ teams.kodi ];
broken = true; # no release for kodi 21
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
jurialmunkey,
}:
buildKodiAddon rec {
pname = "texturemaker";
namespace = "script.texturemaker";
version = "0.2.10";
src = fetchFromGitHub {
owner = "jurialmunkey";
repo = namespace;
rev = "v${version}";
hash = "sha256-GtUDNc0qatGzgSqQdDJgZnrhI1f+SPyoG9Og+oRFxRM=";
};
propagatedBuildInputs = [
jurialmunkey
];
meta = with lib; {
homepage = "https://github.com/jurialmunkey/script.texturemaker/tree/main";
description = "Texture Maker helps skinners build gradient based textures";
license = licenses.gpl3Plus;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
requests,
six,
arrow,
}:
buildKodiAddon rec {
pname = "trakt-module";
namespace = "script.module.trakt";
version = "4.4.0+matrix.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-6JIAQwot5VZ36gvQym88BD/e/mSyS8WO8VqkPn2GcqY=";
};
propagatedBuildInputs = [
requests
six
arrow
];
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.trakt-module";
};
};
meta = with lib; {
homepage = "https://github.com/Razzeee/script.module.trakt";
description = "Python trakt.py library packed for Kodi";
license = licenses.mit;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
trakt-module,
dateutil,
}:
buildKodiAddon rec {
pname = "trakt";
namespace = "script.trakt";
version = "3.6.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-ZlBucYYRA1cL5c0H1jhXeKE1itReZe2gAJYFFxuUebo=";
};
propagatedBuildInputs = [
dateutil
trakt-module
];
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.trakt";
};
};
meta = with lib; {
homepage = "https://kodi.wiki/view/Add-on:Trakt";
description = "Trakt.tv movie and TV show scrobbler for Kodi";
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "typing_extensions";
namespace = "script.module.typing_extensions";
version = "4.7.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-bCGPl5fGVyptCenpNXP/Msi7hu+UdtZd2ms7MfzbsbM=";
};
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.typing_extensions";
};
};
meta = with lib; {
homepage = "https://github.com/python/typing/tree/master/typing_extensions";
description = "Python typing extensions";
license = licenses.psfl;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "upnext";
namespace = "service.upnext";
version = "1.1.9+matrix.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-oNUk80MEzK6Qssn1KjT6psPTazISRoUif1IMo+BKJxo=";
};
passthru = {
pythonPath = "resources/lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.upnext";
};
};
meta = with lib; {
homepage = "https://github.com/im85288/service.upnext";
description = "Up Next - Proposes to play the next episode automatically";
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
}:
buildKodiAddon rec {
pname = "urllib3";
namespace = "script.module.urllib3";
version = "2.2.3";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-xapFA51ENjkB3IldUey5WqXAjMij66dNqILQjKD/VkA=";
};
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.urllib3";
};
};
meta = with lib; {
homepage = "https://urllib3.readthedocs.io/en/latest/";
description = "HTTP library with thread-safe connection pooling, file post, and more";
license = licenses.mit;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
libarchive,
xz,
bzip2,
zlib,
lz4,
lzo,
openssl,
}:
buildKodiBinaryAddon rec {
pname = namespace;
namespace = "vfs.libarchive";
version = "20.1.0";
src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
sha256 = "sha256-D0eLH+G+qF5xLBBX/FdJC+gKNQpqSb7LjRmi/99rPNg=";
};
extraBuildInputs = [
libarchive
xz
bzip2
zlib
lz4
lzo
openssl
];
meta = with lib; {
description = "LibArchive Virtual Filesystem add-on for Kodi";
license = licenses.gpl2Plus;
platforms = platforms.all;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
tinyxml,
}:
buildKodiBinaryAddon rec {
pname = namespace;
namespace = "vfs.rar";
version = "20.1.0";
src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
sha256 = "sha256-8IEYA2gNchCa7O9kzrCbO5DxYWJqPzQN3SJIr9zCWc8=";
};
extraBuildInputs = [ tinyxml ];
meta = with lib; {
description = "RAR archive Virtual Filesystem add-on for Kodi";
license = licenses.gpl2Plus;
platforms = platforms.all;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
openssl,
libssh,
zlib,
}:
buildKodiBinaryAddon rec {
pname = namespace;
namespace = "vfs.sftp";
version = "20.1.0";
src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
sha256 = "sha256-Dv/C8PHaSx13JoGp77rQPtp5G5EH5tqKqzjwZZA7+80=";
};
extraBuildInputs = [
openssl
libssh
zlib
];
meta = with lib; {
description = "SFTP Virtual Filesystem add-on for Kodi";
license = licenses.gpl2Plus;
platforms = platforms.all;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
pkg-config,
glm,
libGL,
}:
buildKodiBinaryAddon rec {
pname = "visualization-fishbmc";
namespace = "visualization.fishbmc";
version = "21.0.2";
src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-4cU5g50ZRnkKSfT/V2hHw1l0PTFkvV4hrxAgPDpfCiw=";
};
extraBuildInputs = [
pkg-config
libGL
];
propagatedBuildInputs = [ glm ];
meta = with lib; {
homepage = "https://github.com/xbmc/visualization.fishbmc";
description = "FishBMC visualization for kodi";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
pkg-config,
glm,
libGL,
}:
buildKodiBinaryAddon rec {
pname = "visualization-goom";
namespace = "visualization.goom";
version = "21.0.2";
src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-TGSYSrQLFrjbp+UMQ14f5sb8thePFZaSH7x/ckLIoqw=";
};
extraBuildInputs = [
pkg-config
libGL
];
propagatedBuildInputs = [ glm ];
meta = with lib; {
homepage = "https://github.com/xbmc/visualization.goom";
description = "Goom visualization for kodi";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
pkg-config,
glm,
libGL,
}:
buildKodiBinaryAddon rec {
pname = "visualization-matrix";
namespace = "visualization.matrix";
version = "20.2.0";
src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-tojzPqt6VMccveqnhkl0yXS+/fLdxotmQO3jdtYlkFk=";
};
extraBuildInputs = [
pkg-config
libGL
];
propagatedBuildInputs = [ glm ];
meta = with lib; {
homepage = "https://github.com/xbmc/visualization.matrix";
description = "Matrix visualization for kodi";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
pkg-config,
glm,
libGL,
}:
buildKodiBinaryAddon rec {
pname = "visualization-pictureit";
namespace = "visualization.pictureit";
version = "21.0.2";
src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-jFRv/fYR/98jcP9GCRVYu2EQIdWQItzYrEoXW/RF+bA=";
};
extraBuildInputs = [
pkg-config
libGL
];
propagatedBuildInputs = [ glm ];
meta = with lib; {
homepage = "https://github.com/xbmc/visualization.pictureit";
description = "PictureIt visualization for kodi";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
pkg-config,
glm,
libGL,
projectm_3,
}:
buildKodiBinaryAddon rec {
pname = "visualization-projectm";
namespace = "visualization.projectm";
version = "21.0.3";
src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-J3RtVl+hO8DspLyF2KAVMLDIJBiEb0bKosKhJyKy9hk=";
};
extraBuildInputs = [
pkg-config
libGL
projectm_3
];
propagatedBuildInputs = [ glm ];
meta = with lib; {
homepage = "https://github.com/xbmc/visualization.projectm";
description = "Projectm visualization for kodi";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
pkg-config,
glm,
libGL,
jsoncpp,
}:
buildKodiBinaryAddon rec {
pname = "visualization-shadertoy";
namespace = "visualization.shadertoy";
version = "21.0.2";
src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-M70WQL4BqFI4LMFLBXlupuXxRkbTqA0OocYlCbY28VQ=";
};
extraBuildInputs = [
pkg-config
libGL
jsoncpp
];
propagatedBuildInputs = [ glm ];
meta = with lib; {
homepage = "https://github.com/xbmc/visualization.shadertoy";
description = "Shadertoy visualization for kodi";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
pkg-config,
glm,
libGL,
}:
buildKodiBinaryAddon rec {
pname = "visualization-spectrum";
namespace = "visualization.spectrum";
version = "21.0.2";
src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-8yGmZeLJ8AdT17yqYVxYbmkZ6DqhlCyblbTUzf8MhE4=";
};
extraBuildInputs = [
pkg-config
libGL
];
propagatedBuildInputs = [ glm ];
meta = with lib; {
homepage = "https://github.com/xbmc/visualization.spectrum";
description = "Spectrum visualization for kodi";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
pkg-config,
glm,
libGL,
}:
buildKodiBinaryAddon rec {
pname = "visualization-starburst";
namespace = "visualization.starburst";
version = "20.2.0";
src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-FTGyQqzRywKjywtckkP56Fc8KwF07A8WUAe0LackxSM=";
};
extraBuildInputs = [
pkg-config
libGL
];
propagatedBuildInputs = [ glm ];
meta = with lib; {
homepage = "https://github.com/xbmc/visualization.starburst";
description = "Starburst visualization for kodi";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
rel,
buildKodiBinaryAddon,
fetchFromGitHub,
pkg-config,
glm,
libGL,
}:
buildKodiBinaryAddon rec {
pname = "visualization-waveform";
namespace = "visualization.waveform";
version = "21.0.2";
src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-RiFPR0nlyrnHzHBosvU+obbdtHXjdgMtxscQTcQ7kLw=";
};
extraBuildInputs = [
pkg-config
libGL
];
propagatedBuildInputs = [ glm ];
meta = with lib; {
homepage = "https://github.com/xbmc/visualization.waveform";
description = "Waveform visualization for kodi";
platforms = platforms.all;
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
rel,
buildKodiAddon,
fetchzip,
addonUpdateScript,
six,
}:
buildKodiAddon rec {
pname = "websocket";
namespace = "script.module.websocket";
version = "1.6.4";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "sha256-1Wy+hxB059UoZnQlncytVT3sQ07dYAhNRnW3/QVD4ZE=";
};
propagatedBuildInputs = [
six
];
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.websocket";
};
};
meta = with lib; {
homepage = "https://github.com/websocket-client/websocket-client";
description = "WebSocket client for Python";
license = licenses.lgpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
}:
buildKodiAddon rec {
pname = "xbmcswift2";
namespace = "script.module.xbmcswift2";
version = "19.0.7";
src = fetchFromGitHub {
owner = "XBMC-Addons";
repo = namespace;
rev = version;
sha256 = "sha256-Z+rHz3wncoNvV1pwhRzJFB/X0H6wdfwg88otVh27wg8=";
};
passthru = {
pythonPath = "lib";
};
meta = with lib; {
homepage = "https://github.com/XBMC-Addons/script.module.xbmcswift2";
description = "Framework to ease development of Kodi addons";
license = licenses.gpl3Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
buildKodiAddon,
fetchFromGitHub,
requests,
inputstream-adaptive,
inputstreamhelper,
}:
buildKodiAddon rec {
pname = "youtube";
namespace = "plugin.video.youtube";
version = "7.2.0.3";
src = fetchFromGitHub {
owner = "anxdpanic";
repo = "plugin.video.youtube";
rev = "v${version}";
hash = "sha256-Igw4F/6+Ewrxsz1RI4csYsHmB12bkbW+764fQvqCx+0=";
};
propagatedBuildInputs = [
requests
inputstream-adaptive
inputstreamhelper
];
passthru = {
pythonPath = "resources/lib";
};
meta = with lib; {
homepage = "https://github.com/anxdpanic/plugin.video.youtube";
description = "YouTube is one of the biggest video-sharing websites of the world";
license = licenses.gpl2Only;
teams = [ teams.kodi ];
};
}

View File

@@ -0,0 +1,36 @@
{
stdenv,
toKodiAddon,
addonDir,
}:
{
name ? "${attrs.pname}-${attrs.version}",
namespace,
sourceDir ? "",
...
}@attrs:
toKodiAddon (
stdenv.mkDerivation (
{
name = "kodi-" + name;
dontStrip = true;
extraRuntimeDependencies = [ ];
installPhase = ''
runHook preInstall
cd ./$sourceDir
d=$out${addonDir}/${namespace}
mkdir -p $d
sauce="."
[ -d ${namespace} ] && sauce=${namespace}
cp -R "$sauce/"* $d
runHook postInstall
'';
}
// attrs
)
)

View File

@@ -0,0 +1,66 @@
{
stdenv,
toKodiAddon,
addonDir,
cmake,
kodi,
kodi-platform,
libcec_platform,
}:
{
name ? "${attrs.pname}-${attrs.version}",
namespace,
version,
extraNativeBuildInputs ? [ ],
extraBuildInputs ? [ ],
extraRuntimeDependencies ? [ ],
extraCMakeFlags ? [ ],
extraInstallPhase ? "",
...
}@attrs:
toKodiAddon (
stdenv.mkDerivation (
{
name = "kodi-" + name;
dontStrip = true;
nativeBuildInputs = [ cmake ] ++ extraNativeBuildInputs;
buildInputs = [
kodi
kodi-platform
libcec_platform
]
++ extraBuildInputs;
inherit extraRuntimeDependencies;
# disables check ensuring install prefix is that of kodi
cmakeFlags = [
"-DOVERRIDE_PATHS=1"
]
++ extraCMakeFlags;
# kodi checks for addon .so libs existence 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
''
runHook preInstall
make install
[[ -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
'';
}
// attrs
)
)

View File

@@ -0,0 +1,21 @@
{ callPackage, ... }@args:
let
unwrapped = callPackage ./unwrapped.nix (removeAttrs args [ "callPackage" ]);
in
unwrapped.overrideAttrs (oldAttrs: {
passthru =
let
finalKodi = oldAttrs.passthru.kodi;
kodiPackages = callPackage ../../../top-level/kodi-packages.nix { kodi = finalKodi; };
in
oldAttrs.passthru
// {
packages = kodiPackages;
withPackages =
func:
callPackage ./wrapper.nix {
kodi = finalKodi;
addons = kodiPackages.requiredKodiAddons (func kodiPackages);
};
};
})

View File

@@ -0,0 +1,525 @@
{
stdenv,
lib,
fetchFromGitHub,
fetchzip,
fetchpatch,
autoconf,
automake,
libtool,
makeWrapper,
pkg-config,
cmake,
yasm,
python3Packages,
libxcrypt,
libgcrypt,
libgpg-error,
libunistring,
boost,
avahi,
lame,
gettext,
pcre-cpp,
yajl,
fribidi,
which,
openssl,
gperf,
tinyxml2,
tinyxml-2,
taglib,
libssh,
jre_headless,
gtest,
ncurses,
spdlog,
libxml2,
systemd,
alsa-lib,
libGLU,
libGL,
ffmpeg,
fontconfig,
freetype,
ftgl,
libjpeg,
libpng,
libtiff,
libmpeg2,
libsamplerate,
libmad,
libogg,
libvorbis,
flac,
libxslt,
lzo,
libcdio,
libmodplug,
libass,
libbluray,
libudfread,
sqlite,
libmysqlclient,
nasm,
gnutls,
libva,
libdrm,
curl,
bzip2,
zip,
unzip,
mesa-demos,
libcec,
libcec_platform,
dcadec,
libuuid,
libcrossguid,
libmicrohttpd,
bluez,
doxygen,
giflib,
glib,
harfbuzz,
lcms2,
libidn2,
libpthreadstubs,
libtasn1,
libplist,
p11-kit,
zlib,
flatbuffers,
fstrcmp,
rapidjson,
lirc,
mesa-gl-headers,
x11Support ? true,
libX11,
xorgproto,
libXt,
libXmu,
libXext,
libXinerama,
libXrandr,
libXtst,
libXfixes,
xdpyinfo,
libXdmcp,
dbusSupport ? true,
dbus,
joystickSupport ? true,
cwiid,
nfsSupport ? true,
libnfs,
pulseSupport ? true,
libpulseaudio,
pipewireSupport ? true,
pipewire,
rtmpSupport ? true,
rtmpdump,
sambaSupport ? true,
samba,
udevSupport ? true,
udev,
opticalSupport ? true,
usbSupport ? false,
libusb-compat-0_1,
vdpauSupport ? true,
libvdpau,
waylandSupport ? false,
wayland,
wayland-protocols,
waylandpp ? null,
libxkbcommon,
gbmSupport ? false,
libgbm,
libinput,
libdisplay-info,
buildPackages,
}:
assert usbSupport -> !udevSupport; # libusb-compat-0_1 won't be used if udev is available
assert gbmSupport || waylandSupport || x11Support;
let
# see https://github.com/xbmc/xbmc/blob/${kodiVersion}-${rel}/tools/depends/target/ to get suggested versions for all dependencies
# We can build these externally but FindLibDvd.cmake forces us to build it
# them, so we currently just use them for the src.
libdvdcss = fetchFromGitHub {
owner = "xbmc";
repo = "libdvdcss";
rev = "1.4.3-Next-Nexus-Alpha2-2";
sha256 = "sha256-CJMGH50mNAkovccNcol5ArF3zUnZKfbVB9EXyQgu5k4=";
};
libdvdnav = fetchFromGitHub {
owner = "xbmc";
repo = "libdvdnav";
rev = "6.1.1-Next-Nexus-Alpha2-2";
sha256 = "sha256-m8SCjOokVbwJ7eVfYKHap1pQjVbI+BXaoxhGZQIg0+k=";
};
libdvdread = fetchFromGitHub {
owner = "xbmc";
repo = "libdvdread";
rev = "6.1.3-Next-Nexus-Alpha2-2";
sha256 = "sha256-AphBQhXud+a6wm52zjzC5biz53NnqWdgpL2QDt2ZuXc=";
};
groovy = fetchzip {
url = "mirror://apache/groovy/4.0.16/distribution/apache-groovy-binary-4.0.16.zip";
sha256 = "sha256-OfZBiMVrhw6VqHRHCSC7ZV3FiZ26n4+F8hsskk+L6yU=";
};
apache_commons_lang = fetchzip {
url = "mirror://apache/commons/lang/binaries/commons-lang3-3.14.0-bin.zip";
sha512 = "sha512-eKF1IQ6PDtifb4pMHWQ2SYHIh0HbMi3qpc92lfbOo3uSsFJVR3n7JD0AdzrG17tLJQA4z5PGDhwyYw0rLeLsXw==";
};
apache_commons_text = fetchzip {
url = "mirror://apache/commons/text/binaries/commons-text-1.11.0-bin.zip";
sha512 = "sha512-P2IvnrHSYRF70LllTMI8aev43h2oe8lq6rrMYw450PEhEa7OuuCjh1Krnc/A4OqENUcidVAAX5dK1RAsZHh8Dg==";
};
kodi_platforms =
lib.optional gbmSupport "gbm"
++ lib.optional waylandSupport "wayland"
++ lib.optional x11Support "x11";
in
stdenv.mkDerivation (
finalAttrs:
let
texturePacker = buildPackages.callPackage (
{
cmake,
giflib,
libjpeg,
libpng,
lzo,
stdenv,
zlib,
pkg-config,
}:
stdenv.mkDerivation {
pname = finalAttrs.pname + "-build-tool-texture-packer";
inherit (finalAttrs) version src;
sourceRoot = "${finalAttrs.src.name}/tools/depends/native/TexturePacker/src";
nativeBuildInputs = [
pkg-config
cmake
];
buildInputs = [
giflib
libjpeg
libpng
lzo
zlib
];
env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.hostPlatform.isWindows) "-DTARGET_POSIX";
preConfigure = ''
cmakeFlagsArray+=(-DKODI_SOURCE_DIR=$src -DCMAKE_MODULE_PATH=$src/cmake/modules)
'';
meta.mainProgram = "TexturePacker";
}
) { };
jsonSchemaBuilder = buildPackages.callPackage (
{ stdenv, cmake }:
stdenv.mkDerivation {
pname = finalAttrs.pname + "-build-tool-json-schema-builder";
inherit (finalAttrs) version src;
sourceRoot = "${finalAttrs.src.name}/tools/depends/native/JsonSchemaBuilder/src";
nativeBuildInputs = [ cmake ];
meta.mainProgram = "JsonSchemaBuilder";
}
) { };
in
{
pname = "kodi";
version = "21.2";
kodiReleaseName = "Omega";
src = fetchFromGitHub {
owner = "xbmc";
repo = "xbmc";
rev = "${finalAttrs.version}-${finalAttrs.kodiReleaseName}";
hash = "sha256-RdTJcq6FPerQx05dU3r8iyaorT4L7162hg5RdywsA88=";
};
patches = [
# Backport to fix build with Pipewire 1.4
# FIXME: remove in the next update
(fetchpatch {
url = "https://github.com/xbmc/xbmc/commit/269053ebbfd3cc4a3156a511f54ab7f08a09a730.patch";
hash = "sha256-JzzrMJvAufrxTxtWnzknUS9JLJEed+qdtVnIYYe9LCw=";
})
];
# make derivations declared in the let binding available here, so
# they can be overridden
inherit
libdvdcss
libdvdnav
libdvdread
groovy
apache_commons_lang
apache_commons_text
;
buildInputs = [
gnutls
libidn2
libtasn1
nasm
p11-kit
libxml2
python3Packages.python
boost
libmicrohttpd
gettext
pcre-cpp
yajl
fribidi
libva
libdrm
openssl
gperf
tinyxml2
tinyxml-2
taglib
libssh
gtest
ncurses
spdlog
alsa-lib
libGL
libGLU
fontconfig
freetype
ftgl
libjpeg
libpng
libtiff
libmpeg2
libsamplerate
libmad
libogg
libvorbis
flac
libxslt
systemd
lzo
libcdio
libmodplug
libass
libbluray
libudfread
sqlite
libmysqlclient
avahi
lame
curl
bzip2
zip
unzip
mesa-demos
libcec
libcec_platform
dcadec
libuuid
libxcrypt
libgcrypt
libgpg-error
libunistring
libcrossguid
libplist
bluez
glib
harfbuzz
lcms2
libpthreadstubs
ffmpeg
flatbuffers
fstrcmp
rapidjson
lirc
mesa-gl-headers
# Deps needed by TexturePacker, which is built and installed in normal
# kodi build, however the one used during the build is not this one
# in order to support cross-compilation.
giflib
zlib
]
++ lib.optionals x11Support [
libX11
xorgproto
libXt
libXmu
libXext.dev
libXdmcp
libXinerama
libXrandr.dev
libXtst
libXfixes
]
++ lib.optional dbusSupport dbus
++ lib.optional joystickSupport cwiid
++ lib.optional nfsSupport libnfs
++ lib.optional pulseSupport libpulseaudio
++ lib.optional pipewireSupport pipewire
++ lib.optional rtmpSupport rtmpdump
++ lib.optional sambaSupport samba
++ lib.optional udevSupport udev
++ lib.optional usbSupport libusb-compat-0_1
++ lib.optional vdpauSupport libvdpau
++ lib.optionals waylandSupport [
wayland
waylandpp.dev
wayland-protocols
# Not sure why ".dev" is needed here, but CMake doesn't find libxkbcommon otherwise
libxkbcommon.dev
]
++ lib.optionals gbmSupport [
libxkbcommon.dev
libgbm
libinput.dev
libdisplay-info
];
nativeBuildInputs = [
cmake
doxygen
makeWrapper
which
pkg-config
autoconf
automake
libtool # still needed for some components. Check if that is the case with 19.0
jre_headless
yasm
gettext
python3Packages.python
flatbuffers
]
++ lib.optionals waylandSupport [
wayland-protocols
waylandpp.bin
];
depsBuildBuild = [
buildPackages.stdenv.cc
];
cmakeFlags = [
"-DAPP_RENDER_SYSTEM=${if gbmSupport then "gles" else "gl"}"
"-Dlibdvdcss_URL=${finalAttrs.libdvdcss}"
"-Dlibdvdnav_URL=${finalAttrs.libdvdnav}"
"-Dlibdvdread_URL=${finalAttrs.libdvdread}"
"-Dgroovy_SOURCE_DIR=${finalAttrs.groovy}"
"-Dapache-commons-lang_SOURCE_DIR=${finalAttrs.apache_commons_lang}"
"-Dapache-commons-text_SOURCE_DIR=${finalAttrs.apache_commons_text}"
# Upstream derives this from the git HEADs hash and date.
# LibreElec (minimal distro for kodi) uses the equivalent to this.
"-DGIT_VERSION=${finalAttrs.version}-${finalAttrs.kodiReleaseName}"
"-DENABLE_EVENTCLIENTS=ON"
"-DENABLE_INTERNAL_CROSSGUID=OFF"
"-DENABLE_INTERNAL_RapidJSON=OFF"
"-DENABLE_OPTICAL=${if opticalSupport then "ON" else "OFF"}"
"-DENABLE_VDPAU=${if vdpauSupport then "ON" else "OFF"}"
"-DLIRC_DEVICE=/run/lirc/lircd"
"-DSWIG_EXECUTABLE=${buildPackages.swig}/bin/swig"
"-DFLATBUFFERS_FLATC_EXECUTABLE=${buildPackages.flatbuffers}/bin/flatc"
"-DPYTHON_EXECUTABLE=${buildPackages.python3Packages.python}/bin/python"
"-DPYTHON_LIB_PATH=${python3Packages.python.sitePackages}"
"-DWITH_JSONSCHEMABUILDER=${lib.getExe jsonSchemaBuilder}"
# When wrapped KODI_HOME will likely contain symlinks to static assets
# that Kodi's built in webserver will cautiously refuse to serve up
# (because their realpaths are outside of KODI_HOME and the other
# whitelisted directories). This adds the entire nix store to the Kodi
# webserver whitelist to avoid this problem.
"-DKODI_WEBSERVER_EXTRA_WHITELIST=${builtins.storeDir}"
]
++ lib.optionals waylandSupport [
"-DWAYLANDPP_SCANNER=${buildPackages.waylandpp}/bin/wayland-scanner++"
]
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"-DWITH_TEXTUREPACKER=${lib.getExe texturePacker}"
];
# 14 tests fail but the biggest issue is that every test takes 30 seconds -
# I'm guessing there is a thing waiting to time out
doCheck = false;
preConfigure = ''
cmakeFlagsArray+=("-DCORE_PLATFORM_NAME=${lib.concatStringsSep " " kodi_platforms}")
'';
postInstall = ''
# TODO: figure out which binaries should be wrapped this way and which shouldn't
for p in $(ls --ignore=kodi-send $out/bin/) ; do
wrapProgram $out/bin/$p \
--prefix PATH ":" "${
lib.makeBinPath (
[
python3Packages.python
mesa-demos
]
++ lib.optional x11Support xdpyinfo
++ lib.optional sambaSupport samba
)
}" \
--prefix LD_LIBRARY_PATH ":" "${
lib.makeLibraryPath (
[
curl
systemd
libmad
libcec
libcec_platform
libass
]
++ lib.optional vdpauSupport libvdpau
++ lib.optional nfsSupport libnfs
++ lib.optional rtmpSupport rtmpdump
)
}"
done
wrapProgram $out/bin/kodi-send \
--prefix PYTHONPATH : $out/${python3Packages.python.sitePackages}
substituteInPlace $out/share/xsessions/kodi.desktop \
--replace kodi-standalone $out/bin/kodi-standalone
'';
doInstallCheck = true;
installCheckPhase = "$out/bin/kodi --version";
passthru = {
pythonPackages = python3Packages;
ffmpeg = ffmpeg;
kodi = finalAttrs.finalPackage;
};
meta = with lib; {
description = "Media center";
homepage = "https://kodi.tv/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
teams = [ teams.kodi ];
mainProgram = "kodi";
};
}
)

View File

@@ -0,0 +1,53 @@
{
lib,
makeWrapper,
buildEnv,
kodi,
addons,
callPackage,
}:
let
kodiPackages = callPackage ../../../top-level/kodi-packages.nix { inherit kodi; };
# linux distros are supposed to provide pillow and pycryptodome
requiredPythonPath =
with kodi.pythonPackages;
makePythonPath [
pillow
pycryptodome
];
# each kodi addon can potentially export a python module which should be included in PYTHONPATH
# see any addon which supplies `passthru.pythonPath` and the corresponding entry in the addons `addon.xml`
# eg. `<extension point="xbmc.python.module" library="lib" />` -> pythonPath = "lib";
additionalPythonPath =
let
addonsWithPythonPath = lib.filter (addon: addon ? pythonPath) addons;
in
lib.concatMapStringsSep ":" (
addon: "${addon}${kodiPackages.addonDir}/${addon.namespace}/${addon.pythonPath}"
) addonsWithPythonPath;
in
buildEnv {
name = "${kodi.name}-env";
paths = [ kodi ] ++ addons;
pathsToLink = [ "/share" ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
mkdir $out/bin
for exe in kodi{,-standalone}
do
makeWrapper ${kodi}/bin/$exe $out/bin/$exe \
--prefix PYTHONPATH : ${requiredPythonPath}:${additionalPythonPath} \
--prefix KODI_HOME : $out/share/kodi \
--prefix LD_LIBRARY_PATH ":" "${
lib.makeLibraryPath (lib.concatMap (plugin: plugin.extraRuntimeDependencies or [ ]) addons)
}"
done
'';
}