From cc2b871e5f43b3a00df253f38070e7e049ec1462 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov Date: Sun, 12 Oct 2025 21:54:31 +0100 Subject: [PATCH] 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 --- gnu/packages/serialization.scm | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index f7bf738d50e2273ea95a5f55a4d5b06ec48c349a..18299d9a701e700dac3a69e0ccc5633833c00c69 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm @@ -21,6 +21,7 @@ ;;; Copyright © 2024 Arun Isaac ;;; Copyright © 2024 Wilko Meyer ;;; Copyright © 2024, 2025 David Elsing +;;; Copyright © 2025 Hennadii Stepanov ;;; ;;; 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