[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
192/197: installer: Only build if guile-ncurses is available.
From: |
Danny Milosavljevic |
Subject: |
192/197: installer: Only build if guile-ncurses is available. |
Date: |
Mon, 3 Jul 2017 20:37:23 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit c718f11c5821144dc69575147521a8111ac23a73
Author: Ricardo Wurmus <address@hidden>
Date: Mon Feb 20 17:26:35 2017 +0100
installer: Only build if guile-ncurses is available.
* configure.ac: Set HAVE_GUILE_NCURSES if Guile ncurses is available.
* Makefile.am (MODULES): Add gurses modules only when HAVE_GUILE_NCURSES is
true.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add the installer modules only when
HAVE_GUILE_NCURSES is true.
* guix/scripts/system.scm: Avoid loading the installer module.
---
Makefile.am | 14 +++++++++----
configure.ac | 4 ++++
gnu/local.mk | 55 +++++++++++++++++++++++++++----------------------
guix/scripts/system.scm | 7 ++++++-
4 files changed, 50 insertions(+), 30 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 9c1215e..0fa5849 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,10 +38,6 @@ include gnu/local.mk
MODULES = \
guix/base16.scm \
- gurses/buttons.scm \
- gurses/form.scm \
- gurses/menu.scm \
- gurses/stexi.scm \
guix/base32.scm \
guix/base64.scm \
guix/cpio.scm \
@@ -183,6 +179,16 @@ MODULES = \
guix.scm \
$(GNU_SYSTEM_MODULES)
+if HAVE_GUILE_NCURSES
+
+MODULES += \
+ gurses/buttons.scm \
+ gurses/form.scm \
+ gurses/menu.scm \
+ gurses/stexi.scm
+
+endif
+
if HAVE_GUILE_JSON
MODULES += \
diff --git a/configure.ac b/configure.ac
index 2b75c90..f62dd23 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,6 +108,10 @@ dnl Check for Guile-Git.
GUILE_MODULE_AVAILABLE([have_guile_git], [(git)])
AM_CONDITIONAL([HAVE_GUILE_GIT], [test "x$have_guile_git" = "xyes"])
+dnl guile-ncurses is used for the system installer
+GUILE_MODULE_AVAILABLE([have_guile_ncurses], [(ncurses curses)])
+AM_CONDITIONAL([HAVE_GUILE_NCURSES], [test "x$have_guile_ncurses" = "xyes"])
+
dnl Make sure we have a full-fledged Guile.
GUIX_ASSERT_GUILE_FEATURES([regex posix socket net-db threads])
diff --git a/gnu/local.mk b/gnu/local.mk
index 64413e5..219442b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -462,31 +462,6 @@ GNU_SYSTEM_MODULES = \
%D%/system/shadow.scm \
%D%/system/vm.scm \
\
- %D%/system/installer/filesystems.scm \
- %D%/system/installer/network.scm \
- %D%/system/installer/wireless.scm \
- %D%/system/installer/install.scm \
- %D%/system/installer/dialog.scm \
- %D%/system/installer/hostname.scm \
- %D%/system/installer/mount-point.scm \
- %D%/system/installer/guixsd-installer.scm \
- %D%/system/installer/disks.scm \
- %D%/system/installer/format.scm \
- %D%/system/installer/locale.scm \
- %D%/system/installer/levelled-stack.scm \
- %D%/system/installer/ping.scm \
- %D%/system/installer/key-map.scm \
- %D%/system/installer/role.scm \
- %D%/system/installer/user-edit.scm \
- %D%/system/installer/users.scm \
- %D%/system/installer/utils.scm \
- %D%/system/installer/page.scm \
- %D%/system/installer/passphrase.scm \
- %D%/system/installer/configure.scm \
- %D%/system/installer/time-zone.scm \
- %D%/system/installer/misc.scm \
- %D%/system/installer/partition-reader.scm \
- \
%D%/build/activation.scm \
%D%/build/cross-toolchain.scm \
%D%/build/file-systems.scm \
@@ -514,6 +489,36 @@ GNU_SYSTEM_MODULES = \
MODULES_NOT_COMPILED += \
%D%/build/svg.scm
+if HAVE_GUILE_NCURSES
+
+GNU_SYSTEM_MODULES += \
+ %D%/system/installer/filesystems.scm \
+ %D%/system/installer/network.scm \
+ %D%/system/installer/wireless.scm \
+ %D%/system/installer/install.scm \
+ %D%/system/installer/dialog.scm \
+ %D%/system/installer/hostname.scm \
+ %D%/system/installer/mount-point.scm \
+ %D%/system/installer/guixsd-installer.scm \
+ %D%/system/installer/disks.scm \
+ %D%/system/installer/format.scm \
+ %D%/system/installer/locale.scm \
+ %D%/system/installer/levelled-stack.scm \
+ %D%/system/installer/ping.scm \
+ %D%/system/installer/key-map.scm \
+ %D%/system/installer/role.scm \
+ %D%/system/installer/user-edit.scm \
+ %D%/system/installer/users.scm \
+ %D%/system/installer/utils.scm \
+ %D%/system/installer/page.scm \
+ %D%/system/installer/passphrase.scm \
+ %D%/system/installer/configure.scm \
+ %D%/system/installer/time-zone.scm \
+ %D%/system/installer/misc.scm \
+ %D%/system/installer/partition-reader.scm
+
+endif
+
patchdir = $(guilemoduledir)/%D%/packages/patches
dist_patch_DATA = \
%D%/packages/patches/4store-fix-buildsystem.patch \
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index c06f80c..162dd0e 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -42,7 +42,6 @@
#:use-module (gnu system file-systems)
#:use-module (gnu system linux-container)
#:use-module (gnu system vm)
- #:use-module (gnu system installer guixsd-installer)
#:use-module (gnu system grub)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
@@ -59,6 +58,12 @@
#:export (guix-system
read-operating-system))
+;; XXX: Use this hack instead of #:autoload to avoid compilation errors.
+;; See <http://bugs.gnu.org/12202>.
+(module-autoload! (current-module)
+ '(gnu system installer guixsd-installer)
+ '(guixsd-installer))
+
;;;
;;; Operating system declaration.
- 149/197: gurses: Add new procedure "word-endings"., (continued)
- 149/197: gurses: Add new procedure "word-endings"., Danny Milosavljevic, 2017/07/03
- 155/197: installer: Use _ instead of M_ for host-name-refresh., Danny Milosavljevic, 2017/07/03
- 160/197: installer: New convenience procedures., Danny Milosavljevic, 2017/07/03
- 158/197: installer: Correct placement of gettext call., Danny Milosavljevic, 2017/07/03
- 163/197: gurses: Cache the windows of buttons., Danny Milosavljevic, 2017/07/03
- 172/197: gurses: Update the cursor position when posting the form., Danny Milosavljevic, 2017/07/03
- 165/197: installer: New procedure key-value-slurp., Danny Milosavljevic, 2017/07/03
- 175/197: gurses: Don't crash if asked for an item by an invalid index., Danny Milosavljevic, 2017/07/03
- 171/197: installer: New page to edit user accounts., Danny Milosavljevic, 2017/07/03
- 187/197: installer: Add procudure for starting a wireless interface., Danny Milosavljevic, 2017/07/03
- 192/197: installer: Only build if guile-ncurses is available.,
Danny Milosavljevic <=
- 68/197: installer: Add new page to set the system role., Danny Milosavljevic, 2017/07/03
- 117/197: installer: Remove unnecessary "begin"., Danny Milosavljevic, 2017/07/03
- 113/197: installer: Explicitly set the #:panel parameter for window creation procedures., Danny Milosavljevic, 2017/07/03
- 122/197: gurses: Populate the choices box in forms., Danny Milosavljevic, 2017/07/03
- 128/197: installer: Remove redundant list of file system types., Danny Milosavljevic, 2017/07/03
- 115/197: installer: New procedure refresh*., Danny Milosavljevic, 2017/07/03
- 153/197: installer: Add optional arguments to addstr*., Danny Milosavljevic, 2017/07/03
- 97/197: installer: Whitespace changes only, Danny Milosavljevic, 2017/07/03
- 139/197: installer: Allow file system specifications to be removed., Danny Milosavljevic, 2017/07/03
- 136/197: installer: No passphrase is needed for clear networks., Danny Milosavljevic, 2017/07/03