diff options
| author | Quentin Aristote <quentin@aristote.fr> | 2023-03-01 13:50:55 +0100 |
|---|---|---|
| committer | Quentin Aristote <quentin@aristote.fr> | 2023-03-01 14:03:57 +0100 |
| commit | 21034a5a36d62fbad795c4139c98c32e0516ec93 (patch) | |
| tree | db063cbb3e91bf7231c0eb54fb54b3cb5ac51dfe /pkgs/static/icons/generate.sh | |
| parent | ceb6a8075e1b6e1228b7c75a8da36ed520d32b5f (diff) | |
restructure pkgs
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 + |
