summaryrefslogtreecommitdiff
path: root/guix/scripts/build.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-04-19 16:53:01 +0200
committerMarius Bakke <mbakke@fastmail.com>2020-04-19 16:53:01 +0200
commit7abe35febe4234609e14e169b6fcc0cbaf4c7119 (patch)
tree5a8307a28e0c0a6aeab21ce8b9d3487229522588 /guix/scripts/build.scm
parent457ded48c54ba04489cb871d3ec6bda0c59bead7 (diff)
parent5c10d55206a4f7a9b932ff08512a4f50c1db35be (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/scripts/build.scm')
-rw-r--r--guix/scripts/build.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 79bd84a1a0..8ff2fd1910 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +22,7 @@
(define-module (guix scripts build)
#:use-module (guix ui)
#:use-module (guix scripts)
+ #:use-module (guix import json)
#:use-module (guix store)
#:use-module (guix derivations)
#:use-module (guix packages)
@@ -834,7 +836,10 @@ build---packages, gexps, derivations, and so on."
(else
(list (specification->package spec)))))
(('file . file)
- (ensure-list (load* file (make-user-module '()))))
+ (let ((file (or (and (string-suffix? ".json" file)
+ (json->scheme-file file))
+ file)))
+ (ensure-list (load* file (make-user-module '())))))
(('manifest . manifest)
(map manifest-entry-item
(manifest-entries