nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 19 lines 742 B view raw
1#!/usr/bin/env nix-shell 2#! nix-shell -I nixpkgs=../../../../.. -i bash -p curl gnused jq common-updater-scripts prefetch-npm-deps 3set -eou pipefail 4 5cd "$(dirname "$0")"/../../../../.. 6version=$(nix-instantiate --strict --eval -A ArchiSteamFarm.version | jq -r) 7cd - 8ui=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "https://api.github.com/repos/JustArchiNET/ArchiSteamFarm/contents/ASF-ui?ref=$version" | jq -r .sha) 9 10curl "https://raw.githubusercontent.com/JustArchiNET/ASF-ui/$ui/package-lock.json" -o package-lock.json 11 12cd - 13update-source-version ArchiSteamFarm.ui "$ui" 14cd - 15 16npmDepsHash=$(prefetch-npm-deps ./package-lock.json) 17sed -E 's#\bnpmDepsHash = ".*?"#npmDepsHash = "'"$npmDepsHash"'"#' -i default.nix 18 19rm package-lock.json