From 9a9c8f7304985eed41f8201eda2dfdc4718d5b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Sun, 29 Mar 2026 18:12:48 +0200 Subject: [PATCH] gnu: louvain-community: Refer to library by path in CMake module. * gnu/packages/maths.scm (louvain-community) [arguments]<#:phases>: Add 'cmake-lib-full-path phase. Change-Id: I5f957c828f39b24a6fa8da8e3d19f16b5c328303 Signed-off-by: Liliana Marie Prikler --- gnu/packages/maths.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 072bf315c6..51aeb80163 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -10082,7 +10082,20 @@ true in all models.") (add-after 'unpack 'no-tune-native (lambda _ (substitute* "CMakeLists.txt" - (("-mtune=native") ""))))))) + (("-mtune=native") "")))) + ;; Refer to the library in ${LOUVAIN_COMMUNITIES_LIBRARIES} by + ;; full path. This ensures that we find references to it in + ;; software using this library via CMake. + ;; + ;; CMake expects module to set this variable to a full path. + ;; See . + (add-after 'unpack 'cmake-lib-full-path + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "louvain_communitiesConfig.cmake.in" + (("louvain_communities") + (string-append + (assoc-ref outputs "out") + "/lib/liblouvain_communities.so")))))))) (native-inputs (list python)) (home-page "https://github.com/meelgroup/louvain-community") (synopsis "Multi-criteria community detection")