~ruther/guix-local

cc2b871e5f43b3a00df253f38070e7e049ec1462 — Hennadii Stepanov 1 year, 1 month ago ba7ec6e
gnu: capnproto: Improve package.

* gnu/packages/serialization.scm (capnproto)[arguments]: Use gexps.
<#:configure-flags>: Add -DCMAKE_POSITION_INDEPENDENT_CODE=ON.
<#:phases>: Relocate the 'use-tmp-for-temporary-files phase before the
'check phase. Set TEST_TMPDIR rather than patching the source.

Change-Id: I8eb5af1e89af8a8697237432c655df880c29296a
Signed-off-by: Andreas Enge <andreas@enge.fr>
1 files changed, 12 insertions(+), 9 deletions(-)

M gnu/packages/serialization.scm
M gnu/packages/serialization.scm => gnu/packages/serialization.scm +12 -9
@@ 21,6 21,7 @@
;;; Copyright © 2024 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2024 Wilko Meyer <w@wmeyer.eu>
;;; Copyright © 2024, 2025 David Elsing <david.elsing@posteo.net>
;;; Copyright © 2025 Hennadii Stepanov <hebasto@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;


@@ 684,15 685,17 @@ This package also provides @samp{kdlpp}, a C++20 wrapper around @samp{ckdl}.")
                "1vs2zpk4l55hb4lq4kldbwdqcjnwm1jblhcaqxmii9dxrd7f807d"))))
    (build-system cmake-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'use-tmp-for-temporary-files
           (lambda _
             ;; Use /tmp for temporary files, as the default /var/tmp directory
             ;; doesn't exist.
             (substitute* "src/kj/filesystem-disk-test.c++"
               (("VAR\\_TMP \"/var/tmp\"")
                "VAR_TMP \"/tmp\"")))))))
     (list
      #:configure-flags
      #~(list "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
      #:phases
      #~(modify-phases %standard-phases
          (add-before 'check 'use-tmp-for-temporary-files
            (lambda _
              ;; Use TMPDIR for temporary files, as the default /var/tmp directory
              ;; doesn't exist.
              (setenv "TEST_TMPDIR"
                      (getenv "TMPDIR")))))))
    (home-page "https://capnproto.org")
    (synopsis "Capability-based RPC and serialization system")
    (description