[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
329/402: build-system/cmake: Wrap Python executables, too.
From: |
guix-commits |
Subject: |
329/402: build-system/cmake: Wrap Python executables, too. |
Date: |
Tue, 18 Aug 2020 16:48:16 -0400 (EDT) |
dannym pushed a commit to branch wip-desktop
in repository guix.
commit a9bfd7c4c9894f1c97a8637217255b3859e89d81
Author: Raghav Gururajan <raghavgururajan@disroot.org>
AuthorDate: Fri Aug 14 15:34:08 2020 +0200
build-system/cmake: Wrap Python executables, too.
* guix/build-system/cmake.scm (%cmake-build-system-modules): Add
%glib-or-gtk-build-system-modules, %python-build-system-modules.
Remove %gnu-build-system-modules.
(lower): Add #:glib-or-gtk? and #:python? to private-keywords.
(cmake-build): Add #:python? to formal parameters and pass it to...
* guix/build/cmake-build-system.scm (cmake-build): ...this.
(install-glib-or-gtk): New procedure.
(install-python): New procedure.
(%standard-phases)[install-glib-or-gtk]: New phase.
[install-python]: New phase.
Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
---
guix/build-system/cmake.scm | 13 +++++++++++--
guix/build/cmake-build-system.scm | 17 ++++++++++++++++-
2 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index f590b6e..e861756 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -26,6 +26,8 @@
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system glib-or-gtk)
+ #:use-module (guix build-system python)
#:use-module (guix packages)
#:use-module (ice-9 match)
#:export (%cmake-build-system-modules
@@ -42,7 +44,10 @@
(define %cmake-build-system-modules
;; Build-side modules imported by default.
`((guix build cmake-build-system)
- ,@%gnu-build-system-modules))
+ ;; The modules from glib-or-gtk contains the modules from gnu-build-system,
+ ;; so there is no need to import that too.
+ ,@%glib-or-gtk-build-system-modules
+ ,@%python-build-system-modules))
(define (default-cmake target)
"Return the default CMake package."
@@ -61,7 +66,7 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- `(#:source #:cmake #:inputs #:native-inputs #:outputs
+ `(#:source #:cmake #:inputs #:native-inputs #:outputs #:glib-or-gtk?
#:python?
,@(if target '() '(#:target))))
(bag
@@ -104,6 +109,8 @@
(build-type "RelWithDebInfo")
(tests? #t)
(test-target "test")
+ (glib-or-gtk? #f)
+ (python? #f)
(parallel-build? #t) (parallel-tests? #t)
(validate-runpath? #t)
(patch-shebangs? #t)
@@ -141,6 +148,8 @@ provides a 'CMakeLists.txt' file as its build system."
#:out-of-source? ,out-of-source?
#:build-type ,build-type
#:tests? ,tests?
+ #:glib-or-gtk? ,glib-or-gtk?
+ #:python? ,python?
#:test-target ,test-target
#:parallel-build? ,parallel-build?
#:parallel-tests? ,parallel-tests?
diff --git a/guix/build/cmake-build-system.scm
b/guix/build/cmake-build-system.scm
index d1ff507..82e272e 100644
--- a/guix/build/cmake-build-system.scm
+++ b/guix/build/cmake-build-system.scm
@@ -21,6 +21,8 @@
(define-module (guix build cmake-build-system)
#:use-module ((guix build gnu-build-system) #:prefix gnu:)
+ #:use-module ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
+ #:use-module ((guix build python-build-system) #:prefix python:)
#:use-module (guix build utils)
#:use-module (ice-9 match)
#:export (%standard-phases
@@ -84,13 +86,26 @@
(gnu-check #:tests? tests? #:test-target test-target
#:parallel-tests? parallel-tests?)))
+(define* (install-glib-or-gtk #:key glib-or-gtk? #:allow-other-keys #:rest
rest)
+ (if glib-or-gtk?
+ (and (apply (assoc-ref glib-or-gtk:%standard-phases
'glib-or-gtk-compile-schemas) rest)
+ (apply (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)
rest))
+ #t))
+
+(define* (install-python #:key python? #:allow-other-keys #:rest rest)
+ (if python?
+ (apply (assoc-ref python:%standard-phases 'wrap) rest)
+ #t))
+
(define %standard-phases
;; Everything is as with the GNU Build System except for the `configure'
;; and 'check' phases.
(modify-phases gnu:%standard-phases
(delete 'bootstrap)
(replace 'check check)
- (replace 'configure configure)))
+ (replace 'configure configure)
+ (add-after 'install 'install-glib-or-gtk install-glib-or-gtk)
+ (add-after 'install 'install-python install-python)))
(define* (cmake-build #:key inputs (phases %standard-phases)
#:allow-other-keys #:rest args)
- 308/402: gnu: Add brltty., (continued)
- 308/402: gnu: Add brltty., guix-commits, 2020/08/18
- 307/402: gnu: Add libbraille., guix-commits, 2020/08/18
- 323/402: gnu: gdm: Update package definition., guix-commits, 2020/08/18
- 311/402: gnu: rygel: Update package definition., guix-commits, 2020/08/18
- 318/402: gnu: Add eglexternalplatform., guix-commits, 2020/08/18
- 322/402: gnu: mutter: Update package definition., guix-commits, 2020/08/18
- 321/402: gnu: gjs: Update package definition., guix-commits, 2020/08/18
- 314/402: gnu: sushi: Update package definition., guix-commits, 2020/08/18
- 326/402: build-system/glib-or-gtk: Also wrap executables that are in "sbin"., guix-commits, 2020/08/18
- 328/402: build-system/meson: Wrap Python executables, too., guix-commits, 2020/08/18
- 329/402: build-system/cmake: Wrap Python executables, too.,
guix-commits <=
- 332/402: gnu: opencv: Fix build with new version of jasper., guix-commits, 2020/08/18
- 333/402: build-system/meson: Only include phases that are enabled., guix-commits, 2020/08/18
- 341/402: gnu: glib: Include python phases., guix-commits, 2020/08/18
- 345/402: gnu: gst-plugins-bad: Include python phases., guix-commits, 2020/08/18
- 346/402: gnu: gst-plugins-base: Include python phases., guix-commits, 2020/08/18
- 347/402: gnu: gst-plugins-good: Include python phases., guix-commits, 2020/08/18
- 348/402: gnu: libnotify: Include python phases., guix-commits, 2020/08/18
- 351/402: gnu: libwpe: Include python phases., guix-commits, 2020/08/18
- 353/402: gnu: pango: Include python phases., guix-commits, 2020/08/18
- 354/402: gnu: webkitgtk: Include glib-or-gtk and python phases., guix-commits, 2020/08/18