Files
nix-dotfiles/utils/eval-to-drv.sh
T

20 lines
476 B
Bash
Raw Normal View History

2024-07-04 00:33:54 -04:00
#!/usr/bin/env nix
2024-07-04 01:20:24 -04:00
#! nix shell nixpkgs#bash nixpkgs#gnugrep nixpkgs#nixVersions.latest --command bash
2024-07-04 00:33:54 -04:00
# diffs each derivation
set -x
set -v
set -e
2024-07-04 01:20:24 -04:00
if [ "$#" -ne 1 ]; then
2025-03-13 17:50:03 -04:00
echo "$0 (pre|post)"
exit 1
2024-07-04 00:33:54 -04:00
fi
script_path=$(dirname "$(readlink -f $0)")
parent_path=$(dirname "$script_path")
2025-03-08 14:47:09 -05:00
out_path="$parent_path/$1.json"
2024-07-04 00:33:54 -04:00
2025-06-28 15:15:17 -04:00
nix run git+https://nayeonie.com/ahuston-0/flake-update-diff --fallback -- --evaluate --allow-import-from-derivation --json "$out_path" "$parent_path"