voor-kia: Add client mods
This commit is contained in:
parent
bb37fddff6
commit
7f3ef18ff8
6 changed files with 125 additions and 4 deletions
pkgs/build-support
|
@ -12,12 +12,15 @@ let
|
|||
# really an odd one...
|
||||
a = head (match "0*([[:digit:]]+)" (substring 0 4 (toString id)));
|
||||
b = head (match "0*([[:digit:]]+)" (substring 4 7 (toString id)));
|
||||
encoded-filename = replaceStrings [ " " ] [ "%20" ] filename;
|
||||
|
||||
url = "https://media.forgecdn.net/files/${a}/${b}/${filename}";
|
||||
url = "https://media.forgecdn.net/files/${a}/${b}/${encoded-filename}";
|
||||
otherArgs = removeAttrs args [ "project" "project_id" "id" "filename" ];
|
||||
|
||||
in fetchurl (otherArgs // {
|
||||
inherit url;
|
||||
# Rename files to avoid names incompatible with the nix store
|
||||
name = "${project}.jar";
|
||||
# Avoid accidental URL globbing
|
||||
curlOpts = "--globoff";
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue