voor-kia: Add mod update script

This commit is contained in:
Tristan Daniël Maat 2021-07-25 22:21:29 +01:00
parent 7c24369cb9
commit d94145bf34
Signed by: tlater
GPG key ID: 49670FD774E43268
4 changed files with 425 additions and 174 deletions
pkgs/build-support

View file

@ -10,11 +10,11 @@ let
#
# Note that if it's zero-prefixed we need to remove the zeroes. It's
# really an odd one...
a = head (match "0*([[:digit:]]+)" (substring 0 4 id));
b = head (match "0*([[:digit:]]+)" (substring 4 7 id));
a = head (match "0*([[:digit:]]+)" (substring 0 4 (toString id)));
b = head (match "0*([[:digit:]]+)" (substring 4 7 (toString id)));
url = "https://media.forgecdn.net/files/${a}/${b}/${filename}";
otherArgs = removeAttrs args [ "project" "id" "filename" ];
otherArgs = removeAttrs args [ "project" "project_id" "id" "filename" ];
in fetchurl (otherArgs // {
inherit url;