21.05 beta release
[NixPkgs.git] / pkgs / top-level / kodi-packages.nix
blobf9bf8dc870619e31d414eef001db4b0d040fe276
1 { lib, newScope, kodi }:
3 with lib;
5 let self = rec {
7   addonDir = "/share/kodi/addons";
8   rel = "Matrix";
10   callPackage = newScope self;
12   inherit kodi;
14   # Convert derivation to a kodi module. Stolen from ../../../top-level/python-packages.nix
15   toKodiAddon = drv: drv.overrideAttrs (oldAttrs: {
16     # Use passthru in order to prevent rebuilds when possible.
17     passthru = (oldAttrs.passthru or {}) // {
18       kodiAddonFor = kodi;
19       requiredKodiAddons = requiredKodiAddons drv.propagatedBuildInputs;
20     };
21   });
23   # Check whether a derivation provides a Kodi addon.
24   hasKodiAddon = drv: drv ? kodiAddonFor && drv.kodiAddonFor == kodi;
26   # Get list of required Kodi addons given a list of derivations.
27   requiredKodiAddons = drvs:
28     let
29       modules = filter hasKodiAddon drvs;
30     in
31       unique (modules ++ concatLists (catAttrs "requiredKodiAddons" modules));
33   # package update scripts
35   addonUpdateScript = callPackage ../applications/video/kodi-packages/addon-update-script { };
37   # package builders
39   buildKodiAddon = callPackage ../applications/video/kodi/build-kodi-addon.nix { };
41   buildKodiBinaryAddon = callPackage ../applications/video/kodi/build-kodi-binary-addon.nix { };
43   # regular packages
45   kodi-platform = callPackage ../applications/video/kodi-packages/kodi-platform { };
47   # addon packages
49   a4ksubtitles = callPackage ../applications/video/kodi-packages/a4ksubtitles { };
51   controllers = {
52     default = callPackage ../applications/video/kodi-packages/controllers { controller = "default"; };
54     dreamcast = callPackage ../applications/video/kodi-packages/controllers { controller = "dreamcast"; };
56     gba = callPackage ../applications/video/kodi-packages/controllers { controller = "gba"; };
58     genesis = callPackage ../applications/video/kodi-packages/controllers { controller = "genesis"; };
60     mouse = callPackage ../applications/video/kodi-packages/controllers { controller = "mouse"; };
62     n64 = callPackage ../applications/video/kodi-packages/controllers { controller = "n64"; };
64     nes = callPackage ../applications/video/kodi-packages/controllers { controller = "nes"; };
66     ps = callPackage ../applications/video/kodi-packages/controllers { controller = "ps"; };
68     snes = callPackage ../applications/video/kodi-packages/controllers { controller = "snes"; };
69   };
71   jellyfin = callPackage ../applications/video/kodi-packages/jellyfin { };
73   joystick = callPackage ../applications/video/kodi-packages/joystick { };
75   netflix = callPackage ../applications/video/kodi-packages/netflix { };
77   svtplay = callPackage ../applications/video/kodi-packages/svtplay { };
79   steam-controller = callPackage ../applications/video/kodi-packages/steam-controller { };
81   steam-launcher = callPackage ../applications/video/kodi-packages/steam-launcher { };
83   pdfreader = callPackage ../applications/video/kodi-packages/pdfreader { };
85   pvr-hts = callPackage ../applications/video/kodi-packages/pvr-hts { };
87   pvr-hdhomerun = callPackage ../applications/video/kodi-packages/pvr-hdhomerun { };
89   pvr-iptvsimple = callPackage ../applications/video/kodi-packages/pvr-iptvsimple { };
91   osmc-skin = callPackage ../applications/video/kodi-packages/osmc-skin { };
93   vfs-sftp = callPackage ../applications/video/kodi-packages/vfs-sftp { };
95   vfs-libarchive = callPackage ../applications/video/kodi-packages/vfs-libarchive { };
97   youtube = callPackage ../applications/video/kodi-packages/youtube { };
99   # addon packages (dependencies)
101   certifi = callPackage ../applications/video/kodi-packages/certifi { };
103   chardet = callPackage ../applications/video/kodi-packages/chardet { };
105   dateutil = callPackage ../applications/video/kodi-packages/dateutil { };
107   idna = callPackage ../applications/video/kodi-packages/idna { };
109   inputstream-adaptive = callPackage ../applications/video/kodi-packages/inputstream-adaptive { };
111   inputstream-ffmpegdirect = callPackage ../applications/video/kodi-packages/inputstream-ffmpegdirect { };
113   inputstream-rtmp = callPackage ../applications/video/kodi-packages/inputstream-rtmp { };
115   inputstreamhelper = callPackage ../applications/video/kodi-packages/inputstreamhelper { };
117   kodi-six = callPackage ../applications/video/kodi-packages/kodi-six { };
119   myconnpy = callPackage ../applications/video/kodi-packages/myconnpy { };
121   requests = callPackage ../applications/video/kodi-packages/requests { };
123   signals = callPackage ../applications/video/kodi-packages/signals { };
125   six = callPackage ../applications/video/kodi-packages/six { };
127   urllib3 = callPackage ../applications/video/kodi-packages/urllib3 { };
129 }; in self