diff --git a/guix/build-system/renpy.scm b/guix/build-system/renpy.scm index 9500b2722ad..d848ecd9c4b 100644 --- a/guix/build-system/renpy.scm +++ b/guix/build-system/renpy.scm @@ -37,10 +37,13 @@ "Return the default Ren'py package, resolved lazily." (@* (gnu packages game-development) renpy)) +(define (default-guile-json) + "Return the default Guile JSON package, resolved lazily." + (@* (gnu packages guile) guile-json-4)) + (define %renpy-build-system-modules ;; Build-side modules imported by default. `((guix build renpy-build-system) - (guix build json) (guix build python-build-system) ,@%default-gnu-imported-modules)) @@ -81,26 +84,29 @@ (search-paths '()) (system (%current-system)) (guile #f) + (guile-json (default-guile-json)) (imported-modules %renpy-build-system-modules) (modules '((guix build renpy-build-system) (guix build utils)))) "Build SOURCE using RENPY, and with INPUTS." (define builder - (with-imported-modules imported-modules - #~(begin - (use-modules #$@(sexp->gexp modules)) - (renpy-build #:name #$name - #:source #+source - #:configure-flags #$configure-flags - #:system #$system - #:phases #$phases - #:outputs #$(outputs->gexp outputs) - #:output #$output - #:game #$game - #:search-paths '#$(sexp->gexp - (map search-path-specification->sexp - search-paths)) - #:inputs #$(input-tuples->gexp inputs))))) + (with-extensions (list guile-json) + (with-imported-modules imported-modules + #~(begin + (use-modules #$@(sexp->gexp modules)) + (renpy-build #:name #$name + #:source #+source + #:configure-flags #$configure-flags + #:system #$system + #:phases #$phases + #:outputs #$(outputs->gexp outputs) + #:output #$output + #:game #$game + #:search-paths + '#$(sexp->gexp + (map search-path-specification->sexp + search-paths)) + #:inputs #$(input-tuples->gexp inputs)))))) (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) system #:graft? #f))) diff --git a/guix/build/renpy-build-system.scm b/guix/build/renpy-build-system.scm index 7c15d52f19a..04ac9120603 100644 --- a/guix/build/renpy-build-system.scm +++ b/guix/build/renpy-build-system.scm @@ -19,10 +19,10 @@ (define-module (guix build renpy-build-system) #:use-module ((guix build gnu-build-system) #:prefix gnu:) #:use-module ((guix build python-build-system) #:prefix python:) - #:use-module (guix build json) #:use-module (guix build utils) #:use-module (ice-9 match) #:use-module (ice-9 ftw) + #:use-module (json) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (%standard-phases @@ -43,7 +43,7 @@ (let* ((out (assoc-ref outputs output)) (json-dump (call-with-input-file (string-append game "/renpy-build.json") - read-json)) + json->scm)) (build (assoc-ref json-dump "build")) (executable-name (assoc-ref build "executable_name")) (directory-name (assoc-ref build "directory_name"))) @@ -67,7 +67,7 @@ (let* ((out (assoc-ref outputs output)) (json-dump (call-with-input-file (string-append game "/renpy-build.json") - read-json)) + json->scm)) (build (assoc-ref json-dump "build")) (directory-name (assoc-ref build "directory_name")) (executable-name (assoc-ref build "executable_name")))