Subject: [bug#31531] [PATCH 2/3] gnu: monero: Update to 0.12.0.0.

From: Ricardo Wurmus <[email-masked]>
Date: Mon, 21 May 2018 22:35:38 +0200

Hi Theodoros,

> * gnu/packages/patches/monero-fix-version.patch: New file.
> * gnu/local.mk: Add it.

I think that this patch is better implemented using “substitute*” in a
build phase.

> * gnu/packages/finance.scm: Update to 0.12.0.0.
> [source]: Add patch.
> [inputs]: Add zeromq, cppzmq, libsodium.
> [arguments]: Change build-type to "release".
> Add argument on unit-tests phase.
> Substitute system* with invoke.

The last step (using “invoke”) is better done in a separate patch.

> -;;; Copyright © 2017 Theodoros Foradis <[email-masked]>
> +;;; Copyright © 2017,2018 Theodoros Foradis <[email-masked]>

Please add a space after the comma.

> -               (zero?
> -                (system* "tests/unit_tests/unit_tests"
> -                         (string-append "--gtest_filter=-"
> -                                        excluded-unit-tests))))))
> +               (invoke "tests/unit_tests/unit_tests"
> +                       (string-append "--gtest_filter=-"
> +                                      excluded-unit-tests)
> +                       ;; Fix for data dir should be upstream by next update.
> +                       ;; TODO: Delete next command line argument.
> +                       (string-append "--data-dir=tests/data")))))

Wha does the TODO comment mean?

> + function (write_static_version_header hash)
> +   set(VERSIONTAG "${hash}")
> +-  configure_file("src/version.cpp.in" "version.cpp")
> ++  configure_file("${CMAKE_SOURCE_DIR}/src/version.cpp.in" "${CMAKE_BINARY_DIR}/version.cpp")
> + endfunction ()

I’d prefer this to be a short substitute* snippet instead of a patch file.

--
Ricardo