From 67ec85e5a567a6f8d6538395d9e01466860a1333 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 13 Jun 2026 22:11:30 +0200 Subject: scripts/unflake.sh: Work around unflake not supporting npins v8 --- scripts/unflake.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scripts') diff --git a/scripts/unflake.sh b/scripts/unflake.sh index e4aa816d..b46df36e 100755 --- a/scripts/unflake.sh +++ b/scripts/unflake.sh @@ -1,6 +1,18 @@ #! /usr/bin/env sh +set -e + +# HACK(@bpeetz): unflake doesn't support npins version 8 yet, so we pretend to still use +# version 7. <2026-06-13> +NPINS_DIRECTORY="$(mktemp -t "npins_fake_dir_for_unflake_XXXXX" -d)" +export NPINS_DIRECTORY + +mv npins/sources.json "$NPINS_DIRECTORY/" +jq '.version = 7' <"$NPINS_DIRECTORY/sources.json" >npins/sources.json + NIX_CONFIG="pure-eval = false" nix run -f https://codeberg.org/goldstein/unflake/archive/main.tar.gz unflake -- "$@" +mv "$NPINS_DIRECTORY/sources.json" npins/sources.json +rmdir "$NPINS_DIRECTORY" # vim: ft=sh -- cgit v1.3.1