diff mbox series

[bug#67065] gnu: protobuf: fix cross-compilation.

Message ID 6ea2ea59a9c0262c67b73c69abba96ae29b63b73.1699692346.git.zhengjunjie@iscas.ac.cn
State New
Headers show
Series [bug#67065] gnu: protobuf: fix cross-compilation. | expand

Commit Message

Z572 Nov. 11, 2023, 8:45 a.m. UTC
* gnu/packages/protobuf.scm (protobuf): fix cross-compilation.
[native-inputs]: when cross-compilation, add this-package.
[inputs]: add googletest.

Change-Id: Id7d3a8be9d4211249c0adc3a99a7a07206f9c495
---
 gnu/packages/protobuf.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)


base-commit: 61c527227ceebdad8da2d52214b253a48323cbb9

Comments

Mathieu Othacehe Nov. 25, 2023, 1:34 p.m. UTC | #1
> * gnu/packages/protobuf.scm (protobuf): fix cross-compilation.
> [native-inputs]: when cross-compilation, add this-package.
> [inputs]: add googletest.

Applied, thanks!

Mathieu
diff mbox series

Patch

diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm
index 8cd805799e..c157eabce0 100644
--- a/gnu/packages/protobuf.scm
+++ b/gnu/packages/protobuf.scm
@@ -8,6 +8,7 @@ 
 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
+;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -156,8 +157,11 @@  (define-public protobuf
                             (install-file file slib)
                             (delete-file file))
                           (find-files lib "\\.a$"))))))))
-    (native-inputs (list googletest))
-    (inputs (list zlib))
+    (native-inputs (append (if (%current-target-system)
+                               (list this-package)
+                               '())
+                           (list googletest)))
+    (inputs (list zlib googletest))
     (home-page "https://github.com/protocolbuffers/protobuf")
     (synopsis "Data encoding for remote procedure calls (RPCs)")
     (description