gnu: hyprutils: Fix cross-compilation.

* gnu/packages/cpp.scm (hyprutils)[arguments]<#:phases>: Set
PKG_CONFIG_EXECUTABLE in CMakeLists.txt.

Change-Id: Ia08cf44230c311f444e4881bdca2b759cda9b112
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Hilton Chain 2024-12-10 00:56:25 +08:00 committed by Ludovic Courtès
parent 1fad7d9d15
commit d7c1c4bc8e
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -701,6 +701,17 @@ (define-public hyprutils
(base32
"01dh24rf62gb6xm32f7mfv6wx0dxprr1q9y73hvv7xanrjyia2zn"))))
(build-system cmake-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-cross-compilation
(lambda _
(substitute* "CMakeLists.txt"
(("find_package.PkgConfig" all)
(string-append
"set(PKG_CONFIG_EXECUTABLE " #$(pkg-config-for-target) ")\n"
all))))))))
(native-inputs (list gcc-13 pkg-config))
(inputs (list pixman))
(home-page "https://github.com/hyprwm/hyprutils")