From 6b7d6a8a278a8f1d1430ef15f4fbe74fb45e3fa7 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Wed, 9 Jul 2025 17:22:56 -0700 Subject: [PATCH 1/1] Use new 'nix hash convert' to quiet new nix's depreciation warnings --- Changelog | 1 + pinch.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 5b6158e..8d0f9f8 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ ## [Unreleased] +- Use new 'nix hash convert' to quiet new nix's depreciation warnings ## [3.3.0] - 2025-07-09 diff --git a/pinch.py b/pinch.py index dcc972c..989e08f 100644 --- a/pinch.py +++ b/pinch.py @@ -326,9 +326,12 @@ _NIX_COMMAND = ['nix', '--experimental-features', 'nix-command'] def to_Digest16(v: Verification, digest32: Digest32) -> Digest16: v.status('Converting digest to base16') process = subprocess.run(_NIX_COMMAND + [ - 'to-base16', - '--type', + 'hash', + 'convert', + '--hash-algo', 'sha256', + '--to', + 'base16', digest32], stdout=subprocess.PIPE) v.result(process.returncode == 0) -- 2.50.1