1 { config, lib, newScope, kodi, libretro }:
6 inherit (libretro) fuse genesis-plus-gx mgba nestopia snes9x twenty-fortyeight;
11 addonDir = "/share/kodi/addons";
14 callPackage = newScope self;
18 # Convert derivation to a kodi module. Stolen from ../../../top-level/python-packages.nix
19 toKodiAddon = drv: drv.overrideAttrs (oldAttrs: {
20 # Use passthru in order to prevent rebuilds when possible.
21 passthru = (oldAttrs.passthru or {}) // {
23 requiredKodiAddons = requiredKodiAddons drv.propagatedBuildInputs;
27 # Check whether a derivation provides a Kodi addon.
28 hasKodiAddon = drv: drv ? kodiAddonFor && drv.kodiAddonFor == kodi;
30 # Get list of required Kodi addons given a list of derivations.
31 requiredKodiAddons = drvs:
33 modules = filter hasKodiAddon drvs;
35 unique (modules ++ concatLists (catAttrs "requiredKodiAddons" modules));
37 # package update scripts
39 addonUpdateScript = callPackage ../applications/video/kodi/addons/addon-update-script { };
43 buildKodiAddon = callPackage ../applications/video/kodi/build-kodi-addon.nix { };
45 buildKodiBinaryAddon = callPackage ../applications/video/kodi/build-kodi-binary-addon.nix { };
49 kodi-platform = callPackage ../applications/video/kodi/addons/kodi-platform { };
53 a4ksubtitles = callPackage ../applications/video/kodi/addons/a4ksubtitles { };
55 arteplussept = callPackage ../applications/video/kodi/addons/arteplussept { };
57 controller-topology-project = callPackage ../applications/video/kodi/addons/controller-topology-project { };
59 iagl = callPackage ../applications/video/kodi/addons/iagl { };
61 invidious = callPackage ../applications/video/kodi/addons/invidious { };
63 libretro = callPackage ../applications/video/kodi/addons/libretro { };
65 libretro-2048 = callPackage ../applications/video/kodi/addons/libretro-2048 { inherit twenty-fortyeight; };
67 libretro-fuse = callPackage ../applications/video/kodi/addons/libretro-fuse { inherit fuse; };
69 libretro-genplus = callPackage ../applications/video/kodi/addons/libretro-genplus { inherit genesis-plus-gx; };
71 libretro-mgba = callPackage ../applications/video/kodi/addons/libretro-mgba { inherit mgba; };
73 libretro-nestopia = callPackage ../applications/video/kodi/addons/libretro-nestopia { inherit nestopia; };
75 libretro-snes9x = callPackage ../applications/video/kodi/addons/libretro-snes9x { inherit snes9x; };
77 jellyfin = callPackage ../applications/video/kodi/addons/jellyfin { };
79 joystick = callPackage ../applications/video/kodi/addons/joystick { };
81 keymap = callPackage ../applications/video/kodi/addons/keymap { };
83 netflix = callPackage ../applications/video/kodi/addons/netflix { };
85 orftvthek = callPackage ../applications/video/kodi/addons/orftvthek { };
87 radioparadise = callPackage ../applications/video/kodi/addons/radioparadise { };
89 svtplay = callPackage ../applications/video/kodi/addons/svtplay { };
91 steam-controller = callPackage ../applications/video/kodi/addons/steam-controller { };
93 steam-launcher = callPackage ../applications/video/kodi/addons/steam-launcher { };
95 steam-library = callPackage ../applications/video/kodi/addons/steam-library { };
97 somafm = callPackage ../applications/video/kodi/addons/somafm { };
99 pdfreader = callPackage ../applications/video/kodi/addons/pdfreader { };
101 pvr-hts = callPackage ../applications/video/kodi/addons/pvr-hts { };
103 pvr-hdhomerun = callPackage ../applications/video/kodi/addons/pvr-hdhomerun { };
105 pvr-iptvsimple = callPackage ../applications/video/kodi/addons/pvr-iptvsimple { };
107 osmc-skin = callPackage ../applications/video/kodi/addons/osmc-skin { };
109 vfs-libarchive = callPackage ../applications/video/kodi/addons/vfs-libarchive { };
111 vfs-rar = callPackage ../applications/video/kodi/addons/vfs-rar { };
113 vfs-sftp = callPackage ../applications/video/kodi/addons/vfs-sftp { };
115 visualization-fishbmc = callPackage ../applications/video/kodi/addons/visualization-fishbmc { };
117 visualization-goom = callPackage ../applications/video/kodi/addons/visualization-goom { };
119 visualization-matrix = callPackage ../applications/video/kodi/addons/visualization-matrix { };
121 visualization-pictureit = callPackage ../applications/video/kodi/addons/visualization-pictureit { };
123 visualization-projectm = callPackage ../applications/video/kodi/addons/visualization-projectm { };
125 visualization-shadertoy = callPackage ../applications/video/kodi/addons/visualization-shadertoy { };
127 visualization-spectrum = callPackage ../applications/video/kodi/addons/visualization-spectrum { };
129 visualization-starburst = callPackage ../applications/video/kodi/addons/visualization-starburst { };
131 visualization-waveform = callPackage ../applications/video/kodi/addons/visualization-waveform { };
133 youtube = callPackage ../applications/video/kodi/addons/youtube { };
135 # addon packages (dependencies)
137 archive_tool = callPackage ../applications/video/kodi/addons/archive_tool { };
139 certifi = callPackage ../applications/video/kodi/addons/certifi { };
141 chardet = callPackage ../applications/video/kodi/addons/chardet { };
143 dateutil = callPackage ../applications/video/kodi/addons/dateutil { };
145 defusedxml = callPackage ../applications/video/kodi/addons/defusedxml { };
147 future = callPackage ../applications/video/kodi/addons/future { };
149 idna = callPackage ../applications/video/kodi/addons/idna { };
151 infotagger = callPackage ../applications/video/kodi/addons/infotagger { };
153 inputstream-adaptive = callPackage ../applications/video/kodi/addons/inputstream-adaptive { };
155 inputstream-ffmpegdirect = callPackage ../applications/video/kodi/addons/inputstream-ffmpegdirect { };
157 inputstream-rtmp = callPackage ../applications/video/kodi/addons/inputstream-rtmp { };
159 inputstreamhelper = callPackage ../applications/video/kodi/addons/inputstreamhelper { };
161 kodi-six = callPackage ../applications/video/kodi/addons/kodi-six { };
163 myconnpy = callPackage ../applications/video/kodi/addons/myconnpy { };
165 requests = callPackage ../applications/video/kodi/addons/requests { };
167 requests-cache = callPackage ../applications/video/kodi/addons/requests-cache { };
169 routing = callPackage ../applications/video/kodi/addons/routing { };
171 sendtokodi = callPackage ../applications/video/kodi/addons/sendtokodi { };
173 signals = callPackage ../applications/video/kodi/addons/signals { };
175 simplejson = callPackage ../applications/video/kodi/addons/simplejson { };
177 six = callPackage ../applications/video/kodi/addons/six { };
179 urllib3 = callPackage ../applications/video/kodi/addons/urllib3 { };
181 websocket = callPackage ../applications/video/kodi/addons/websocket { };
183 xbmcswift2 = callPackage ../applications/video/kodi/addons/xbmcswift2 { };
185 typing_extensions = callPackage ../applications/video/kodi/addons/typing_extensions { };
187 arrow = callPackage ../applications/video/kodi/addons/arrow { };
189 trakt-module = callPackage ../applications/video/kodi/addons/trakt-module { };
191 trakt = callPackage ../applications/video/kodi/addons/trakt { };
192 }; in self // lib.optionalAttrs config.allowAliases {
193 # deprecated or renamed packages
195 controllers = throw "kodi.packages.controllers has been replaced with kodi.packages.controller-topology-project - a package which contains a large number of controller profiles." { };