lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at master 35 lines 963 B view raw
1#!/usr/bin/env nix-shell 2#!nix-shell -i bash -p nix-update yq 3 4set -euo pipefail 5 6nix-update "${UPDATE_NIX_ATTR_PATH}" 7 8src="$(nix-build -A "${UPDATE_NIX_ATTR_PATH}".src --no-out-link)" 9 10( 11 echo "# This file has been autogenerated by update.sh" 12 echo "# Do not edit this file manually." 13 14 echo "{" 15 16 yq -r '.[]|[.name, .version] | @tsv' < "${src}/scripts/plugin/plugin.yaml" \ 17 | while IFS=$'\t' read -r name version; do 18 echo " \"${name}\" = {" 19 20 echo " version = \"${version}\";" 21 22 url="https://github.com/perses/plugins/releases/download/${name,,}/v${version}/${name}-${version}.tar.gz" 23 echo " url = \"${url}\";" 24 25 hash="$(nix-prefetch-url "${url}" --name "${UPDATE_NIX_PNAME}-${name,,}-${version}.tar.gz")" 26 hash="$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 "${hash}")" 27 28 echo " hash = \"${hash}\";" 29 30 echo " };" 31 done 32 33 echo "}" 34) > "$(dirname "${BASH_SOURCE[0]}")/plugins.nix" 35