[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/7] guix build: Add 'build-package'.
From: |
Alex Kost |
Subject: |
[PATCH 6/7] guix build: Add 'build-package'. |
Date: |
Sat, 25 Jul 2015 11:49:56 +0300 |
* guix/scripts/build.scm (build-package): New procedure.
---
guix/scripts/build.scm | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index f169853..b710b59 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <address@hidden>
;;; Copyright © 2013 Mark H Weaver <address@hidden>
+;;; Copyright © 2015 Alex Kost <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -39,9 +40,20 @@
set-build-options-from-command-line
set-build-options-from-command-line*
show-build-options-help
-
+ build-package
guix-build))
+(define (build-package package . build-options)
+ "Build PACKAGE using BUILD-OPTIONS."
+ (with-store store
+ (let* ((drv (run-with-store store
+ (package->derivation package)))
+ (drvs (list drv)))
+ (apply set-build-options store build-options)
+ (show-what-to-build store drvs)
+ (build-derivations store drvs)
+ (show-derivation-outputs drv))))
+
(define (register-root store paths root)
"Register ROOT as an indirect GC root for all of PATHS."
(let* ((root (string-append (canonicalize-path (dirname root))
--
2.4.3
- [PATCH 1/7] emacs: Move guile related code to "guix-guile.el"., (continued)
[PATCH 3/7] emacs: Add code to call guile procedures., Alex Kost, 2015/07/25
[PATCH 5/7] ui: Add 'show-derivation-outputs'., Alex Kost, 2015/07/25
[PATCH 6/7] guix build: Add 'build-package'.,
Alex Kost <=
[PATCH 7/7] emacs: Add 'guix-devel-use-current-module'., Alex Kost, 2015/07/25