about summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2023-10-21 14:34:29 +0200
committerPatrick Steinhardt <ps@pks.im>2023-10-21 14:38:12 +0200
commit011eb16003fefbd387ce4a63d9e9c6703c09c201 (patch)
treeaaf2b92727b4bbc6fec5f3d149bbea309c002c91 /pkgs/applications/video
parentcf813b03db0ea8428f86863c298a9660cb0c55c4 (diff)
kodi.packages.youtube: refactor to fetch from GitHub
Refactor kodi.packages.youtube to fetch sources from GitHub instead of
using the official Kodi addons repository. Newer versions of the addon
are not released (yet) on the official addon repository, whereas older
versions of the addon don't work properly anymore with YouTube.

The only resulting difference between old and new version is an
additional README.md file:

$ diff -r result-old result-new
Only in result-new/share/kodi/addons/plugin.video.youtube: README.md

Other than that, this refactoring is a no-op change and will allow us to
upgrade the addon to newer versions more readily.
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/kodi/addons/youtube/default.nix13
1 files changed, 6 insertions, 7 deletions
diff --git a/pkgs/applications/video/kodi/addons/youtube/default.nix b/pkgs/applications/video/kodi/addons/youtube/default.nix
index bdc4be3a23faa..50273878b424e 100644
--- a/pkgs/applications/video/kodi/addons/youtube/default.nix
+++ b/pkgs/applications/video/kodi/addons/youtube/default.nix
@@ -1,13 +1,15 @@
-{ lib, buildKodiAddon, fetchzip, addonUpdateScript, six, requests, infotagger, inputstreamhelper }:
+{ lib, buildKodiAddon, fetchFromGitHub, six, requests, infotagger, inputstreamhelper }:
 
 buildKodiAddon rec {
   pname = "youtube";
   namespace = "plugin.video.youtube";
   version = "7.0.1";
 
-  src = fetchzip {
-    url = "https://mirrors.kodi.tv/addons/nexus/${namespace}/${namespace}-${version}.zip";
-    sha256 = "sha256-Wdju7d2kFX0V1J1TB75qEVq0UWN2xYYFNlD8UTt1New=";
+  src = fetchFromGitHub {
+    owner = "anxdpanic";
+    repo = "plugin.video.youtube";
+    rev = "v${version}";
+    hash = "sha256-BHCVui+enKFH3elz6DovXMDxMQx/2+/BrIw3KQr9TfE=";
   };
 
   propagatedBuildInputs = [
@@ -19,9 +21,6 @@ buildKodiAddon rec {
 
   passthru = {
     pythonPath = "resources/lib";
-    updateScript = addonUpdateScript {
-      attrPath = "kodi.packages.youtube";
-    };
   };
 
   meta = with lib; {