diff options
| author | Quentin Aristote <quentin@aristote.fr> | 2023-02-12 18:39:54 +0100 |
|---|---|---|
| committer | Quentin Aristote <quentin@aristote.fr> | 2023-02-15 22:13:57 +0100 |
| commit | 365a7368718fc52964eb487058a34c7a124e6989 (patch) | |
| tree | 2f9e0fe71b2edebd0a695d69025430b558da7b74 /pkgs/icons/generate-package.sh | |
| parent | 6ea803da80558e269564c99070e92e285cf977ff (diff) | |
add pkgs
Diffstat (limited to 'pkgs/icons/generate-package.sh')
| -rwxr-xr-x | pkgs/icons/generate-package.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/icons/generate-package.sh b/pkgs/icons/generate-package.sh new file mode 100755 index 0000000..bf34c84 --- /dev/null +++ b/pkgs/icons/generate-package.sh @@ -0,0 +1,11 @@ +icons=$(cat icons.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}Icon = fetchurl {\n\t\turl = \"$url\";\n\t\tsha256 = \"$sha256\";\n\t};" | tee -a default.nix +done <<< $icons +echo '}' | tee -a default.nix |
