1 { config, lib, newScope, kodi, libretro }:
12 inherit (libretro) fuse genesis-plus-gx mgba nestopia snes9x twenty-fortyeight;
14 callPackage = newScope self;
16 # Check whether a derivation provides a Kodi addon.
17 hasKodiAddon = drv: drv ? kodiAddonFor && drv.kodiAddonFor == kodi;
19 # Get list of required Kodi addons given a list of derivations.
20 requiredKodiAddons = drvs:
22 modules = filter hasKodiAddon drvs;
24 unique (modules ++ concatLists (catAttrs "requiredKodiAddons" modules));
27 addonDir = "/share/kodi/addons";
29 rel = kodi.kodiReleaseName;
31 inherit callPackage kodi hasKodiAddon requiredKodiAddons;
33 # Convert derivation to a kodi module. Stolen from ../../../top-level/python-packages.nix
34 toKodiAddon = drv: drv.overrideAttrs (oldAttrs: {
35 # Use passthru in order to prevent rebuilds when possible.
36 passthru = (oldAttrs.passthru or {}) // {
38 requiredKodiAddons = requiredKodiAddons drv.propagatedBuildInputs;
42 # package update scripts
44 addonUpdateScript = callPackage ../applications/video/kodi/addons/addon-update-script { };
48 buildKodiAddon = callPackage ../applications/video/kodi/build-kodi-addon.nix { };
50 buildKodiBinaryAddon = callPackage ../applications/video/kodi/build-kodi-binary-addon.nix { };
54 kodi-platform = callPackage ../applications/video/kodi/addons/kodi-platform { };
58 a4ksubtitles = callPackage ../applications/video/kodi/addons/a4ksubtitles { };
60 arteplussept = callPackage ../applications/video/kodi/addons/arteplussept { };
62 controller-topology-project = callPackage ../applications/video/kodi/addons/controller-topology-project { };
64 formula1 = callPackage ../applications/video/kodi/addons/formula1 { };
66 iagl = callPackage ../applications/video/kodi/addons/iagl { };
68 invidious = callPackage ../applications/video/kodi/addons/invidious { };
70 libretro = callPackage ../applications/video/kodi/addons/libretro { };
72 libretro-2048 = callPackage ../applications/video/kodi/addons/libretro-2048 { inherit twenty-fortyeight; };
74 libretro-fuse = callPackage ../applications/video/kodi/addons/libretro-fuse { inherit fuse; };
76 libretro-genplus = callPackage ../applications/video/kodi/addons/libretro-genplus { inherit genesis-plus-gx; };
78 libretro-mgba = callPackage ../applications/video/kodi/addons/libretro-mgba { inherit mgba; };
80 libretro-nestopia = callPackage ../applications/video/kodi/addons/libretro-nestopia { inherit nestopia; };
82 libretro-snes9x = callPackage ../applications/video/kodi/addons/libretro-snes9x { inherit snes9x; };
84 jellycon = callPackage ../applications/video/kodi/addons/jellycon { };
86 jellyfin = callPackage ../applications/video/kodi/addons/jellyfin { };
88 joystick = callPackage ../applications/video/kodi/addons/joystick { };
90 keymap = callPackage ../applications/video/kodi/addons/keymap { };
92 mediacccde = callPackage ../applications/video/kodi/addons/mediacccde { };
94 mediathekview = callPackage ../applications/video/kodi/addons/mediathekview { };
96 netflix = callPackage ../applications/video/kodi/addons/netflix { };
98 orftvthek = callPackage ../applications/video/kodi/addons/orftvthek { };
100 radioparadise = callPackage ../applications/video/kodi/addons/radioparadise { };
102 raiplay = callPackage ../applications/video/kodi/addons/raiplay { };
104 skyvideoitalia = callPackage ../applications/video/kodi/addons/skyvideoitalia { };
106 svtplay = callPackage ../applications/video/kodi/addons/svtplay { };
108 steam-controller = callPackage ../applications/video/kodi/addons/steam-controller { };
110 steam-launcher = callPackage ../applications/video/kodi/addons/steam-launcher { };
112 steam-library = callPackage ../applications/video/kodi/addons/steam-library { };
114 somafm = callPackage ../applications/video/kodi/addons/somafm { };
116 pdfreader = callPackage ../applications/video/kodi/addons/pdfreader { };
118 pvr-hts = callPackage ../applications/video/kodi/addons/pvr-hts { };
120 pvr-hdhomerun = callPackage ../applications/video/kodi/addons/pvr-hdhomerun { };
122 pvr-iptvsimple = callPackage ../applications/video/kodi/addons/pvr-iptvsimple { };
124 pvr-vdr-vnsi = callPackage ../applications/video/kodi/addons/pvr-vdr-vnsi { };
126 osmc-skin = callPackage ../applications/video/kodi/addons/osmc-skin { };
128 upnext = callPackage ../applications/video/kodi/addons/upnext { };
130 vfs-libarchive = callPackage ../applications/video/kodi/addons/vfs-libarchive { };
132 vfs-rar = callPackage ../applications/video/kodi/addons/vfs-rar { };
134 vfs-sftp = callPackage ../applications/video/kodi/addons/vfs-sftp { };
136 visualization-fishbmc = callPackage ../applications/video/kodi/addons/visualization-fishbmc { };
138 visualization-goom = callPackage ../applications/video/kodi/addons/visualization-goom { };
140 visualization-matrix = callPackage ../applications/video/kodi/addons/visualization-matrix { };
142 visualization-pictureit = callPackage ../applications/video/kodi/addons/visualization-pictureit { };
144 visualization-projectm = callPackage ../applications/video/kodi/addons/visualization-projectm { };
146 visualization-shadertoy = callPackage ../applications/video/kodi/addons/visualization-shadertoy { };
148 visualization-spectrum = callPackage ../applications/video/kodi/addons/visualization-spectrum { };
150 visualization-starburst = callPackage ../applications/video/kodi/addons/visualization-starburst { };
152 visualization-waveform = callPackage ../applications/video/kodi/addons/visualization-waveform { };
154 youtube = callPackage ../applications/video/kodi/addons/youtube { };
156 # addon packages (dependencies)
158 archive_tool = callPackage ../applications/video/kodi/addons/archive_tool { };
160 certifi = callPackage ../applications/video/kodi/addons/certifi { };
162 chardet = callPackage ../applications/video/kodi/addons/chardet { };
164 dateutil = callPackage ../applications/video/kodi/addons/dateutil { };
166 defusedxml = callPackage ../applications/video/kodi/addons/defusedxml { };
168 future = callPackage ../applications/video/kodi/addons/future { };
170 idna = callPackage ../applications/video/kodi/addons/idna { };
172 infotagger = callPackage ../applications/video/kodi/addons/infotagger { };
174 inputstream-adaptive = callPackage ../applications/video/kodi/addons/inputstream-adaptive { };
176 inputstream-ffmpegdirect = callPackage ../applications/video/kodi/addons/inputstream-ffmpegdirect { };
178 inputstream-rtmp = callPackage ../applications/video/kodi/addons/inputstream-rtmp { };
180 inputstreamhelper = callPackage ../applications/video/kodi/addons/inputstreamhelper { };
182 kodi-six = callPackage ../applications/video/kodi/addons/kodi-six { };
184 myconnpy = callPackage ../applications/video/kodi/addons/myconnpy { };
186 plugin-cache = callPackage ../applications/video/kodi/addons/plugin-cache { };
188 requests = callPackage ../applications/video/kodi/addons/requests { };
190 requests-cache = callPackage ../applications/video/kodi/addons/requests-cache { };
192 routing = callPackage ../applications/video/kodi/addons/routing { };
194 sendtokodi = callPackage ../applications/video/kodi/addons/sendtokodi { };
196 signals = callPackage ../applications/video/kodi/addons/signals { };
198 simplecache = callPackage ../applications/video/kodi/addons/simplecache { };
200 simplejson = callPackage ../applications/video/kodi/addons/simplejson { };
202 six = callPackage ../applications/video/kodi/addons/six { };
204 sponsorblock = callPackage ../applications/video/kodi/addons/sponsorblock { };
206 urllib3 = callPackage ../applications/video/kodi/addons/urllib3 { };
208 websocket = callPackage ../applications/video/kodi/addons/websocket { };
210 xbmcswift2 = callPackage ../applications/video/kodi/addons/xbmcswift2 { };
212 typing_extensions = callPackage ../applications/video/kodi/addons/typing_extensions { };
214 arrow = callPackage ../applications/video/kodi/addons/arrow { };
216 trakt-module = callPackage ../applications/video/kodi/addons/trakt-module { };
218 trakt = callPackage ../applications/video/kodi/addons/trakt { };
219 }; in self // optionalAttrs config.allowAliases {
220 # deprecated or renamed packages
222 controllers = throw "kodi.packages.controllers has been replaced with kodi.packages.controller-topology-project - a package which contains a large number of controller profiles." { };