diff options
| author | tv <tv@krebsco.de> | 2026-12-03 14:31:46 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-12-03 14:35:00 +0000 |
| commit | ad97d9096009264de2007ec221afaeb1492f51fe (patch) | |
| tree | 871b3813c48733f17a8d98913799c2a2b34e3e83 | |
| parent | 1f3602b65e1ef7aa474ff6614b0a2e47c76593e8 (diff) | |
krops.nix: diff with nix-diff-rs
| -rw-r--r-- | krops.nix | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -351,13 +351,11 @@ rec { diff = /* sh */ '' nix --extra-experimental-features nix-command \ store diff-closures /run/current-system "$system" - if command -v nix-diff >/dev/null; then - nix-diff --environment --skip-already-compared /run/current-system "$system" - else + nix_diff=$( NIX_PATH=${lib.escapeShellArg target'.path} \ - nix-shell -p nix-diff --run \ - "nix-diff --environment --skip-already-compared /run/current-system $system" - fi + nix-build --no-out-link --attr pkgs.nix-diff-rs '<hrm>' + ) + "$nix_diff"/bin/nix-diff /run/current-system "$system" "$system"/bin/switch-to-configuration dry-activate ''; }} @@ -687,8 +685,7 @@ rec { nix-store --query --deriver "$(readlink -f /run/current-system)" ''}) if nix-store --check-validity "$old_drv" 2>/dev/null; then - ${pkgs.nix-diff}/bin/nix-diff --environment --skip-already-compared \ - "$old_drv" "$drv" + ${local.pkgs.nix-diff-rs}/bin/nix-diff "$old_drv" "$drv" else echo "$name: no nix-diff: the running system's derivation isn't" \ "here ($old_drv)" >&2 |
