Support base16 1.0 (#33)

See https://github.com/emilypi/Base16/blob/master/MIGRATION-1.0.md
This commit is contained in:
Naïm Favier 2024-02-02 00:59:36 +01:00 committed by GitHub
parent 21e65cb4c6
commit 4d9eacfcf7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ executable nix-serve
cxx-options: -std=c++17
build-depends: base < 5
, base16
, base16 >= 1.0
, base32
, bytestring
, charset

View File

@ -231,7 +231,7 @@ fingerprintPath storePath PathInfo{ narHash, narSize, references } = do
base32Suffix <- if
| ByteString.length suffix == 64
, Right digest <- Base16.decodeBase16 suffix ->
, Right digest <- Base16.decodeBase16Untyped suffix ->
return (Base32.encodeBase32' digest)
| ByteString.length suffix == 52 ->
return suffix