From 365a7368718fc52964eb487058a34c7a124e6989 Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Sun, 12 Feb 2023 18:39:54 +0100 Subject: add pkgs --- pkgs/icons/generate-package.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 pkgs/icons/generate-package.sh (limited to 'pkgs/icons/generate-package.sh') 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 -- cgit v1.2.3