From 523083b6dc33d7101255aacd11eebed2187323d2 Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Sun, 30 Jun 2024 13:53:40 +0300 Subject: [PATCH] add json-to-nix script --- scripts/json-to-nix.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 scripts/json-to-nix.sh diff --git a/scripts/json-to-nix.sh b/scripts/json-to-nix.sh new file mode 100755 index 0000000..ccbfd30 --- /dev/null +++ b/scripts/json-to-nix.sh @@ -0,0 +1,4 @@ +#! /usr/bin/env nix-shell +#! nix-shell -i bash -p nixfmt-rfc-style + +nix-instantiate --eval -E "builtins.fromJSON (builtins.readFile "$(realpath $1)")" | nixfmt