nix-dotfiles/utils/eval-to-drv.sh
ahuston-0 8e806a9e83
All checks were successful
Check flake.lock / Check health of `flake.lock` (pull_request) Successful in 13s
Check Nix flake / Perform Nix flake checks (pull_request) Successful in 5m46s
Update utils/eval-to-drv.sh
2025-06-28 15:15:17 -04:00

20 lines
476 B
Bash
Executable File

#!/usr/bin/env nix
#! nix shell nixpkgs#bash nixpkgs#gnugrep nixpkgs#nixVersions.latest --command bash
# diffs each derivation
set -x
set -v
set -e
if [ "$#" -ne 1 ]; then
echo "$0 (pre|post)"
exit 1
fi
script_path=$(dirname "$(readlink -f $0)")
parent_path=$(dirname "$script_path")
out_path="$parent_path/$1.json"
nix run git+https://nayeonie.com/ahuston-0/flake-update-diff --fallback -- --evaluate --allow-import-from-derivation --json "$out_path" "$parent_path"