guix: Revert accidentally committed changes.
This is a follow-up to commit fb1db38547
.
* guix/scripts/build.scm (lazy-util): Remove procedure.
(options->things-to-build): Remove special case for files with ".json"
extension.
master
parent
a6edcfaf78
commit
07f80c27fd
|
@ -1,7 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
|
||||||
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
|
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -32,11 +31,9 @@
|
||||||
|
|
||||||
#:use-module (guix monads)
|
#:use-module (guix monads)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:autoload (json) (json-string->scm)
|
|
||||||
#:autoload (guix http-client) (http-fetch http-get-error?)
|
#:autoload (guix http-client) (http-fetch http-get-error?)
|
||||||
#:use-module (ice-9 format)
|
#:use-module (ice-9 format)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (ice-9 rdelim)
|
|
||||||
#:use-module (ice-9 vlist)
|
#:use-module (ice-9 vlist)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-11)
|
#:use-module (srfi srfi-11)
|
||||||
|
@ -58,10 +55,6 @@
|
||||||
register-root
|
register-root
|
||||||
register-root*))
|
register-root*))
|
||||||
|
|
||||||
;; Lazy reference to import utils to avoid cycle
|
|
||||||
(define (lazy-util sym)
|
|
||||||
(module-ref (resolve-interface '(guix import utils)) sym))
|
|
||||||
|
|
||||||
(define %default-log-urls
|
(define %default-log-urls
|
||||||
;; Default base URLs for build logs.
|
;; Default base URLs for build logs.
|
||||||
'("http://hydra.gnu.org/log"))
|
'("http://hydra.gnu.org/log"))
|
||||||
|
@ -613,16 +606,7 @@ build---packages, gexps, derivations, and so on."
|
||||||
(else
|
(else
|
||||||
(list (specification->package spec)))))
|
(list (specification->package spec)))))
|
||||||
(('file . file)
|
(('file . file)
|
||||||
(if (string-suffix? ".json" file)
|
(ensure-list (load* file (make-user-module '()))))
|
||||||
(begin
|
|
||||||
;; Load (json) lazily to avoid hard dependency.
|
|
||||||
;; TODO: doesn't work
|
|
||||||
(let* ((json (json-string->scm
|
|
||||||
(with-input-from-file file read-string)))
|
|
||||||
(pkg ((lazy-util 'data->guix-package)
|
|
||||||
((lazy-util 'hash-table->alist) json))))
|
|
||||||
(ensure-list pkg)))
|
|
||||||
(ensure-list (load* file (make-user-module '())))))
|
|
||||||
(('expression . str)
|
(('expression . str)
|
||||||
(ensure-list (read/eval str)))
|
(ensure-list (read/eval str)))
|
||||||
(('argument . (? derivation? drv))
|
(('argument . (? derivation? drv))
|
||||||
|
|
Reference in New Issue