nitter: use guest_accounts branch in updateScript

This commit is contained in:
Sophie Tauchert 2023-12-27 20:45:54 +01:00
parent 5f64a12a72
commit c53dd4b212
No known key found for this signature in database
GPG Key ID: 52701DE5F5F51125
2 changed files with 1 additions and 26 deletions

View File

@ -40,7 +40,7 @@ buildNimPackage (finalAttrs: prevAttrs: {
passthru = {
tests = { inherit (nixosTests) nitter; };
updateScript = unstableGitUpdater {};
updateScript = unstableGitUpdater { branch = "guest_accounts"; };
};
meta = with lib; {

View File

@ -1,25 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq nix nix-update patchutils
set -euo pipefail
info() {
if [ -t 2 ]; then
set -- '\033[32m%s\033[39m\n' "$@"
else
set -- '%s\n' "$@"
fi
printf "$@" >&2
}
nitter_old_rev=$(nix-instantiate --eval --strict --json -A nitter.src.rev . | jq -r .)
nix-update --version=branch --commit nitter
nitter_new_rev=$(nix-instantiate --eval --strict --json -A nitter.src.rev . | jq -r .)
if [ "$nitter_new_rev" = "$nitter_old_rev" ]; then
info "nitter is up-to-date."
exit
fi
if curl -Sfs "https://github.com/zedeus/nitter/compare/$nitter_old_rev...$nitter_new_rev.patch" \
| lsdiff | grep -Fxe 'a/nitter.nimble' -e 'b/nitter.nimble' > /dev/null; then
info "nitter.nimble changed, some dependencies probably need updating."
fi