summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2025-09-11 12:40:26 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2025-11-15 17:32:45 +0100
commit0353a510cfc06d5210d2e07e405f578c408b5edb (patch)
treea0e807ec8bfd21a6719784ec325699460199c6e2
parent5bbed7ee0156288fdc1217f4cd1b1ebdb56cc9c5 (diff)
build-system: renpy: Migrate to (json).
* guix/build/renpy-build-system.scm: Use (json) rather than (guix build json). (install, install-desktop-file): Replace ‘read-json’ with ‘json->scm’. * guix/build-system/renpy.scm (default-guile-json): New variable. (%renpy-build-system-modules): Adjust accordingly. (renpy-build): Add guile-json argument and use it as extension. Fixes guix/guix#2618.
-rw-r--r--guix/build-system/renpy.scm38
-rw-r--r--guix/build/renpy-build-system.scm6
2 files changed, 25 insertions, 19 deletions
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")))