From: Scott Worley Date: Thu, 10 Jul 2025 00:22:56 +0000 (-0700) Subject: Use new 'nix hash convert' to quiet new nix's depreciation warnings X-Git-Tag: v3.3.1~1 X-Git-Url: http://git.scottworley.com/pinch/commitdiff_plain/6b7d6a8a278a8f1d1430ef15f4fbe74fb45e3fa7 Use new 'nix hash convert' to quiet new nix's depreciation warnings --- 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)