[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#40629] [PATCH 4/5] scripts/build: options->things-to-build: Handle
From: |
Ludovic Courtès |
Subject: |
[bug#40629] [PATCH 4/5] scripts/build: options->things-to-build: Handle .json files. |
Date: |
Thu, 16 Apr 2020 23:53:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Ricardo Wurmus <address@hidden> skribis:
> + (let ((file (or (and (string-suffix? ".json" file)
> + (json->scheme-file file))
> + file)))
> + (ensure-list (load* file (make-user-module '())))))
Actually, perhaps we could have a file handler alist, like:
`((".json" ,load-json)
(_ ,(cute load* <> (make-user-module '()))))
That could be shared with (guix scripts package), and ‘load-json’ could
do something that avoids going through a file.
Late feedback, nightly thoughts. :-)
Ludo’.
[bug#40629] Build and install packages from JSON definitions, Christopher Baines, 2020/04/15