summaryrefslogtreecommitdiff
path: root/guix/scripts/package.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/package.scm
parent457ded48c54ba04489cb871d3ec6bda0c59bead7 (diff)
parent5c10d55206a4f7a9b932ff08512a4f50c1db35be (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r--guix/scripts/package.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index b2b734aadd..43a3bb2825 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2016 Benz Schenk <benz.schenk@uzh.ch>
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -33,6 +34,7 @@
#:use-module (guix packages)
#:use-module (guix profiles)
#:use-module (guix search-paths)
+ #:use-module (guix import json)
#:use-module (guix monads)
#:use-module (guix utils)
#:use-module (guix config)
@@ -416,7 +418,10 @@ Install, remove, or upgrade packages in a single transaction.\n"))
(option '(#\f "install-from-file") #t #f
(lambda (opt name arg result arg-handler)
(values (alist-cons 'install
- (load* arg (make-user-module '()))
+ (let ((file (or (and (string-suffix? ".json" arg)
+ (json->scheme-file arg))
+ arg)))
+ (load* file (make-user-module '())))
result)
#f)))
(option '(#\r "remove") #f #t