kodi.packages: add update script for addons from kodi repository
This commit is contained in:
parent
e0b04570fe
commit
2d9ac44320
@ -0,0 +1,23 @@
|
||||
{ writeShellScript
|
||||
, nix
|
||||
, curl
|
||||
, gzip
|
||||
, xmlstarlet
|
||||
, common-updater-scripts
|
||||
}:
|
||||
|
||||
{ attrPath }:
|
||||
|
||||
let
|
||||
url = "http://mirrors.kodi.tv/addons/matrix/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 ]
|
@ -1,4 +1,4 @@
|
||||
{ lib, buildKodiAddon, fetchzip }:
|
||||
{ lib, buildKodiAddon, fetchzip, addonUpdateScript }:
|
||||
buildKodiAddon rec {
|
||||
pname = "certifi";
|
||||
namespace = "script.module.certifi";
|
||||
@ -9,6 +9,10 @@ buildKodiAddon rec {
|
||||
sha256 = "0vsd68izv1ix0hb1gm74qq3zff0sxmhfhjyh7y9005zzp2gpi62v";
|
||||
};
|
||||
|
||||
passthru.updateScript = addonUpdateScript {
|
||||
attrPath = "kodi.packages.certifi";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://certifi.io";
|
||||
description = "Python package for providing Mozilla's CA Bundle";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, buildKodiAddon, fetchzip }:
|
||||
{ lib, buildKodiAddon, fetchzip, addonUpdateScript }:
|
||||
buildKodiAddon rec {
|
||||
pname = "chardet";
|
||||
namespace = "script.module.chardet";
|
||||
@ -9,6 +9,10 @@ buildKodiAddon rec {
|
||||
sha256 = "05928dj4fsj2zg8ajdial3sdf8izddq64sr0al3zy1gqw91jp80f";
|
||||
};
|
||||
|
||||
passthru.updateScript = addonUpdateScript {
|
||||
attrPath = "kodi.packages.chardet";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Freso/script.module.chardet";
|
||||
description = "Universal encoding detector";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, buildKodiAddon, fetchzip }:
|
||||
{ lib, buildKodiAddon, fetchzip, addonUpdateScript }:
|
||||
buildKodiAddon rec {
|
||||
pname = "idna";
|
||||
namespace = "script.module.idna";
|
||||
@ -9,6 +9,10 @@ buildKodiAddon rec {
|
||||
sha256 = "02s75fhfmbs3a38wvxba51aj3lv5bidshjdkl6yjfji6waxpr9xh";
|
||||
};
|
||||
|
||||
passthru.updateScript = addonUpdateScript {
|
||||
attrPath = "kodi.packages.idna";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Freso/script.module.idna";
|
||||
description = "Internationalized Domain Names for Python";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, buildKodiAddon, fetchzip }:
|
||||
{ lib, buildKodiAddon, fetchzip, addonUpdateScript }:
|
||||
buildKodiAddon rec {
|
||||
pname = "inputstreamhelper";
|
||||
namespace = "script.module.inputstreamhelper";
|
||||
@ -9,6 +9,10 @@ buildKodiAddon rec {
|
||||
sha256 = "18lkksljfa57w69yklbldf7dgyykrm84pd10mdjdqdm88fdiiijk";
|
||||
};
|
||||
|
||||
passthru.updateScript = addonUpdateScript {
|
||||
attrPath = "kodi.packages.inputstreamhelper";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/emilsvennesson/script.module.inputstreamhelper";
|
||||
description = "A simple Kodi module that makes life easier for add-on developers relying on InputStream based add-ons and DRM playback";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, buildKodiAddon, fetchzip }:
|
||||
{ lib, buildKodiAddon, fetchzip, addonUpdateScript }:
|
||||
buildKodiAddon rec {
|
||||
pname = "myconnpy";
|
||||
namespace = "script.module.myconnpy";
|
||||
@ -9,6 +9,10 @@ buildKodiAddon rec {
|
||||
sha256 = "1cx3qdzw9lkkmbyvyrmc2i193is20fihn2sfl7kmv43f708vam0k";
|
||||
};
|
||||
|
||||
passthru.updateScript = addonUpdateScript {
|
||||
attrPath = "kodi.packages.myconnpy";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://dev.mysql.com/doc/connector-python/en/index.html";
|
||||
description = "MySQL Connector/Python";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, buildKodiAddon, fetchzip, certifi, chardet, idna, urllib3 }:
|
||||
{ lib, buildKodiAddon, fetchzip, addonUpdateScript, certifi, chardet, idna, urllib3 }:
|
||||
buildKodiAddon rec {
|
||||
pname = "requests";
|
||||
namespace = "script.module.requests";
|
||||
@ -16,6 +16,10 @@ buildKodiAddon rec {
|
||||
urllib3
|
||||
];
|
||||
|
||||
passthru.updateScript = addonUpdateScript {
|
||||
attrPath = "kodi.packages.requests";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://python-requests.org";
|
||||
description = "Python HTTP for Humans";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, buildKodiAddon, fetchzip }:
|
||||
{ lib, buildKodiAddon, fetchzip, addonUpdateScript }:
|
||||
buildKodiAddon rec {
|
||||
pname = "signals";
|
||||
namespace = "script.module.addon.signals";
|
||||
@ -9,6 +9,10 @@ buildKodiAddon rec {
|
||||
sha256 = "1qcjbakch8hvx02wc01zv014nmzgn6ahc4n2bj5mzr114ppd3hjs";
|
||||
};
|
||||
|
||||
passthru.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";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, buildKodiAddon, fetchzip }:
|
||||
{ lib, buildKodiAddon, fetchzip, addonUpdateScript }:
|
||||
buildKodiAddon rec {
|
||||
pname = "urllib3";
|
||||
namespace = "script.module.urllib3";
|
||||
@ -9,6 +9,10 @@ buildKodiAddon rec {
|
||||
sha256 = "080yq8ns0sag6rmdag1hjwi0whcmp35wzqjp3by92m81cpszs75q";
|
||||
};
|
||||
|
||||
passthru.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";
|
||||
|
@ -30,6 +30,10 @@ let self = rec {
|
||||
in
|
||||
unique (modules ++ concatLists (catAttrs "requiredKodiAddons" modules));
|
||||
|
||||
# package update scripts
|
||||
|
||||
addonUpdateScript = callPackage ../applications/video/kodi-packages/addon-update-script { };
|
||||
|
||||
# package builders
|
||||
|
||||
buildKodiAddon = callPackage ../applications/video/kodi/build-kodi-addon.nix { };
|
||||
|
Loading…
Reference in New Issue
Block a user