]> git.scottworley.com Git - pinch/commitdiff
Use new 'nix hash convert' to quiet new nix's depreciation warnings
authorScott Worley <scottworley@scottworley.com>
Thu, 10 Jul 2025 00:22:56 +0000 (17:22 -0700)
committerScott Worley <scottworley@scottworley.com>
Thu, 10 Jul 2025 00:27:29 +0000 (17:27 -0700)
Changelog
pinch.py

index 5b6158e421004373c2dfcc4bb50dfc1d3e7c0974..8d0f9f869a58e31c6f20b483b91d1f94d309e684 100644 (file)
--- 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
index dcc972cd016f190508a79f5c482dee0786b55bc3..989e08fd4f6769078290f749650fb7a6811ad397 100644 (file)
--- 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)