all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] installer: Only build if guile-ncurses is available.
@ 2017-02-20 16:43 Ricardo Wurmus
  2017-02-20 20:23 ` John Darrington
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2017-02-20 16:43 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 304 bytes --]

Hi John,

the following patch ensures that Guix can be built without the installer
in case guile-ncurses is not available.  This is primarily for the
benefit of packagers who want to provide Guix on foreign distros, who
would not benefit from the installer and who may not have guile-ncurses
available.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-installer-Only-build-if-guile-ncurses-is-available.patch --]
[-- Type: text/x-patch, Size: 5842 bytes --]

From fad5f5fb8dffb4a1cbe40ee9d31a346b901305d1 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Mon, 20 Feb 2017 17:26:35 +0100
Subject: [PATCH] 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 2f9bf4744..0a8c6a61d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,10 +30,6 @@ nodist_noinst_SCRIPTS =				\
 include gnu/local.mk
 
 MODULES =					\
-  gurses/buttons.scm                            \
-  gurses/form.scm                               \
-  gurses/menu.scm                               \
-  gurses/stexi.scm                              \
   guix/base32.scm				\
   guix/base64.scm				\
   guix/cpio.scm					\
@@ -166,6 +162,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 06b0618b4..3dff7cb9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,6 +95,10 @@ dnl guile-json is used for the PyPI package importer
 GUILE_MODULE_AVAILABLE([have_guile_json], [(json)])
 AM_CONDITIONAL([HAVE_GUILE_JSON], [test "x$have_guile_json" = "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 67fe767cd..9c0f27832 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -443,31 +443,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			\
@@ -490,6 +465,36 @@ GNU_SYSTEM_MODULES =				\
   %D%/tests/ssh.scm				\
   %D%/tests/web.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 =						\
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 121bd4d6d..c4b91a9ad 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -40,7 +40,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)
@@ -57,6 +56,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))
+
 \f
 ;;;
 ;;; Operating system declaration.
-- 
2.11.1


[-- Attachment #3: Type: text/plain, Size: 89 bytes --]


--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] installer: Only build if guile-ncurses is available.
  2017-02-20 16:43 [PATCH] installer: Only build if guile-ncurses is available Ricardo Wurmus
@ 2017-02-20 20:23 ` John Darrington
  2017-02-20 22:05   ` Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: John Darrington @ 2017-02-20 20:23 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel, John Darrington

[-- Attachment #1: Type: text/plain, Size: 718 bytes --]

It looks good to me.

Feel free to push to wip-installer

J'

On Mon, Feb 20, 2017 at 05:43:18PM +0100, Ricardo Wurmus wrote:
     Hi John,
     
     the following patch ensures that Guix can be built without the installer
     in case guile-ncurses is not available.  This is primarily for the
     benefit of packagers who want to provide Guix on foreign distros, who
     would not benefit from the installer and who may not have guile-ncurses
     available.
     


-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] installer: Only build if guile-ncurses is available.
  2017-02-20 20:23 ` John Darrington
@ 2017-02-20 22:05   ` Ricardo Wurmus
  0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2017-02-20 22:05 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel, John Darrington


John Darrington <john@darrington.wattle.id.au> writes:

> It looks good to me.
>
> Feel free to push to wip-installer

Done!

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-20 22:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-20 16:43 [PATCH] installer: Only build if guile-ncurses is available Ricardo Wurmus
2017-02-20 20:23 ` John Darrington
2017-02-20 22:05   ` Ricardo Wurmus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.