gnu: grpc: Modernize.
* gnu/packages/rpc.scm (grpc) [arguments]: Use gexps. Delete trailing #t. [native-inputs]: Remove labels. * gnu/packages/rpc.scm (grpc-1.16.1) [arguments]: Use gexps. Change-Id: I0e89d246cc62a293274a32344108a7249f343257master
parent
c9e3806ec1
commit
7fd2f2e6fd
|
@ -5,7 +5,7 @@
|
||||||
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
|
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
|
||||||
;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
|
;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
|
||||||
;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2022, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -65,55 +65,53 @@
|
||||||
"1fs407hnlnm0b8sncjwys9rc7ia5nb7wxrpx39nq3pzzfs1lv3vq"))))
|
"1fs407hnlnm0b8sncjwys9rc7ia5nb7wxrpx39nq3pzzfs1lv3vq"))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; no test target
|
(list
|
||||||
|
#:tests? #f ; no test target
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
(list "-DgRPC_ZLIB_PROVIDER=package"
|
#~(list "-DgRPC_ZLIB_PROVIDER=package"
|
||||||
"-DgRPC_ABSL_PROVIDER=package"
|
"-DgRPC_ABSL_PROVIDER=package"
|
||||||
"-DgRPC_CARES_PROVIDER=package"
|
"-DgRPC_CARES_PROVIDER=package"
|
||||||
"-DgRPC_SSL_PROVIDER=package"
|
"-DgRPC_SSL_PROVIDER=package"
|
||||||
"-DgRPC_PROTOBUF_PROVIDER=package"
|
"-DgRPC_PROTOBUF_PROVIDER=package"
|
||||||
"-DgRPC_RE2_PROVIDER=package"
|
"-DgRPC_RE2_PROVIDER=package"
|
||||||
(string-append "-DCMAKE_INSTALL_PREFIX="
|
(string-append "-DCMAKE_INSTALL_PREFIX=" #$output)
|
||||||
(assoc-ref %outputs "out"))
|
|
||||||
"-DCMAKE_INSTALL_LIBDIR=lib"
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
||||||
(string-append "-DCMAKE_INSTALL_RPATH="
|
(string-append "-DCMAKE_INSTALL_RPATH=" #$output "/lib")
|
||||||
(assoc-ref %outputs "out") "/lib")
|
|
||||||
"-DCMAKE_VERBOSE_MAKEFILE=ON")
|
"-DCMAKE_VERBOSE_MAKEFILE=ON")
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-before 'configure 'configure-shared
|
(add-before 'configure 'configure-shared
|
||||||
(lambda* (#:key (configure-flags '()) #:allow-other-keys)
|
(lambda* (#:key configure-flags #:allow-other-keys)
|
||||||
(mkdir "../build-shared")
|
(mkdir "../build-shared")
|
||||||
(with-directory-excursion "../build-shared"
|
(with-directory-excursion "../build-shared"
|
||||||
(apply invoke
|
(apply invoke "cmake" "../source"
|
||||||
"cmake" "../source"
|
|
||||||
"-DBUILD_SHARED_LIBS=ON"
|
"-DBUILD_SHARED_LIBS=ON"
|
||||||
configure-flags)
|
configure-flags)
|
||||||
(apply invoke "make"
|
(apply invoke "make"
|
||||||
`("-j" ,(number->string (parallel-job-count)))))))
|
(list "-j" (number->string (parallel-job-count)))))))
|
||||||
(add-after 'install 'install-shared-libraries
|
(add-after 'install 'install-shared-libraries
|
||||||
(lambda _
|
(lambda _
|
||||||
(with-directory-excursion "../build-shared"
|
(with-directory-excursion "../build-shared"
|
||||||
(invoke "make" "install"))))
|
(invoke "make" "install"))))
|
||||||
(add-before 'strip 'move-static-libs
|
(add-before 'strip 'move-static-libs
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda _
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(let ((static #$output:static))
|
||||||
(static (assoc-ref outputs "static")))
|
|
||||||
(mkdir-p (string-append static "/lib"))
|
(mkdir-p (string-append static "/lib"))
|
||||||
(with-directory-excursion
|
(with-directory-excursion (string-append #$output "/lib")
|
||||||
(string-append out "/lib")
|
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (file)
|
(lambda (file)
|
||||||
(rename-file file
|
(rename-file file (string-append static "/lib/" file)))
|
||||||
(string-append static "/lib/" file)))
|
(find-files "." "\\.a$")))))))))
|
||||||
(find-files "." "\\.a$"))))
|
|
||||||
#t)))))
|
|
||||||
(inputs
|
|
||||||
(list abseil-cpp-cxxstd11 c-ares/cmake openssl re2 zlib))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("pkg-config" ,pkg-config)
|
(list pkg-config
|
||||||
("protobuf" ,protobuf)
|
protobuf
|
||||||
("python" ,python-wrapper)))
|
python-wrapper))
|
||||||
|
(inputs
|
||||||
|
(list abseil-cpp-cxxstd11
|
||||||
|
c-ares/cmake
|
||||||
|
openssl
|
||||||
|
re2
|
||||||
|
zlib))
|
||||||
(home-page "https://grpc.io")
|
(home-page "https://grpc.io")
|
||||||
(synopsis "High performance universal RPC framework")
|
(synopsis "High performance universal RPC framework")
|
||||||
(description "gRPC is a modern high performance @dfn{Remote Procedure Call}
|
(description "gRPC is a modern high performance @dfn{Remote Procedure Call}
|
||||||
|
@ -159,7 +157,7 @@ browsers to backend services.")
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments grpc)
|
(substitute-keyword-arguments (package-arguments grpc)
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
`(modify-phases ,phases
|
#~(modify-phases #$phases
|
||||||
;; Note: This would be nicer as a snippet, but that creates a tarball
|
;; Note: This would be nicer as a snippet, but that creates a tarball
|
||||||
;; instead of a checkout and breaks assumptions made by the builder.
|
;; instead of a checkout and breaks assumptions made by the builder.
|
||||||
(add-after 'unpack 'rename-gettid
|
(add-after 'unpack 'rename-gettid
|
||||||
|
|
Reference in New Issue