gnu: erlang-jsx: Fix tests under Erlang 27+.

* gnu/packages/erlang.scm (erlang-jsx): Fix tests under Erlang 27+.

Change-Id: Iaade94de64b5e5837a6a54376ba946c20d7107b9
Signed-off-by: Andrew Tropin <andrew@trop.in>
This commit is contained in:
Igor Goryachev via Guix-patches via 2024-08-07 19:32:09 +03:00 committed by Andrew Tropin
parent 9c6353c556
commit d029fef845
No known key found for this signature in database
GPG key ID: 2208D20958C1DEB0

View file

@ -541,6 +541,16 @@ (define-public erlang-jsx
(base32
"1wr7jkxm6nlgvd52xhniav64xr9rml2ngb35rwjwqlqvq7ywhp0c"))))
(build-system rebar-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
;; Fix tests for running under Erlang 27+.
(add-after 'unpack 'fix-tests-for-erlang-27
(lambda _
(substitute* "src/jsx_decoder.erl"
(("\\{\"-0\\.0\", \\[\\{float, 0\\.0\\}, end_json\\], <<\"-0\\.0\">>\\},")
"{\"0.0\", [{float, 0.0}, end_json], <<\"0.0\">>},
{\"-0.0\", [{float, -0.0}, end_json], <<\"-0.0\">>},")))))))
(synopsis "Streaming, evented JSON parsing toolkit")
(description
"An Erlang application for consuming, producing and manipulating json.")