diff options
Diffstat (limited to 'pkgs/static/icons/generate.sh')
| -rwxr-xr-x | pkgs/static/icons/generate.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/static/icons/generate.sh b/pkgs/static/icons/generate.sh new file mode 100755 index 0000000..b5df4ab --- /dev/null +++ b/pkgs/static/icons/generate.sh @@ -0,0 +1,12 @@ +icons=$(cat urls.txt) + +echo '{ fetchurl }:' | tee default.nix +echo '{' | tee -a default.nix +while read -r line; do + name=$(echo $line | cut -f1 -d' ') + url=$(echo $line | cut -f2 -d' ') + sha256=$(nix-prefetch-url $url 2>/dev/null) + echo -e "\t${name} = fetchurl {\n\t\turl = \"$url\";\n\t\tsha256 = \"$sha256\";\n\t};" | tee -a default.nix +done <<< $icons +echo '}' | tee -a default.nix + |
