summaryrefslogtreecommitdiff
path: root/pkgs/static/icons/generate.sh
diff options
context:
space:
mode:
authorQuentin Aristote <quentin@aristote.fr>2023-03-01 13:50:55 +0100
committerQuentin Aristote <quentin@aristote.fr>2023-03-01 14:03:57 +0100
commit21034a5a36d62fbad795c4139c98c32e0516ec93 (patch)
treedb063cbb3e91bf7231c0eb54fb54b3cb5ac51dfe /pkgs/static/icons/generate.sh
parentceb6a8075e1b6e1228b7c75a8da36ed520d32b5f (diff)
restructure pkgs
Diffstat (limited to 'pkgs/static/icons/generate.sh')
-rwxr-xr-xpkgs/static/icons/generate.sh12
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
+