aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am27
1 files changed, 26 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 2dfb627239..7c07d1b2b9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,6 +5,7 @@
# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
# Copyright © 2016, 2017 Mark H Weaver <mhw@netris.org>
# Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+# Copyright © 2017 Leo Famulari <leo@famulari.name>
#
# This file is part of GNU Guix.
#
@@ -224,7 +225,8 @@ AUX_FILES = \
EXAMPLES = \
gnu/system/examples/bare-bones.tmpl \
gnu/system/examples/desktop.tmpl \
- gnu/system/examples/lightweight-desktop.tmpl
+ gnu/system/examples/lightweight-desktop.tmpl \
+ gnu/system/examples/vm-image.tmpl
GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go)
@@ -571,12 +573,21 @@ BINARY_TARBALLS = \
# Systems supported by GuixSD.
GUIXSD_SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux
+# Systems for which we build GuixSD VMs.
+GUIXSD_VM_SYSTEMS ?= x86_64-linux
+
# Prefix of the GuixSD installation image file name.
GUIXSD_IMAGE_BASE = guixsd-usb-install-$(PACKAGE_VERSION)
+# Prefix of the GuixSD VM image file name.
+GUIXSD_VM_IMAGE_BASE = guixsd-vm-image-$(PACKAGE_VERSION)
+
# Size of the installation image (for x86_64 typically).
GUIXSD_INSTALLATION_IMAGE_SIZE ?= 950MiB
+# Size of the VM image (for x86_64 typically).
+GUIXSD_VM_IMAGE_SIZE ?= 2GiB
+
# The release process works in several phases:
#
# 0. We assume the developer created a 'vX.Y' tag.
@@ -631,6 +642,20 @@ release: dist
mv "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz.tmp" \
"$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz" ; \
done
+ for system in $(GUIXSD_VM_SYSTEMS) ; do \
+ image=`$(top_builddir)/pre-inst-env \
+ guix system vm-image \
+ --system=$$system \
+ --image-size=$(GUIXSD_VM_IMAGE_SIZE) \
+ gnu/system/examples/vm-image.tmpl` ; \
+ if [ ! -f "$$image" ] ; then \
+ echo "failed to produced GuixSD VM image for $$system" >&2 ; \
+ exit 1 ; \
+ fi ; \
+ xz < "$$image" > "$(releasedir)/$(GUIXSD_VM_IMAGE_BASE).$$system.xz.tmp" ; \
+ mv "$(releasedir)/$(GUIXSD_VM_IMAGE_BASE).$$system.xz.tmp" \
+ "$(releasedir)/$(GUIXSD_VM_IMAGE_BASE).$$system.xz" ; \
+ done
@echo
@echo "Congratulations! All the release files are now in $(releasedir)."
@echo