guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 147767904e828371e17f8a2900150c313491dee0
Author: Aaron1371 <[email protected]>
AuthorDate: Sun Sep 28 15:28:12 2025 -0600
gnu: Add dkjson.
* gnu/packages/lua.scm (dkjson): New variable.
Merges guix/guix!1267
Change-Id: I7b804adf9832888d35b9432e086dee432fd1704d
Signed-off-by: Cayetano Santos <[email protected]>
---
gnu/packages/lua.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 0c89dab2cd..20e091918f 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -25,6 +25,7 @@
;;; Copyright © 2024, 2026 Maxim Cournoyer <[email protected]>
;;; Copyright © 2025 Zheng Junjie <[email protected]>
;;; Copyright © 2025 Ashish SHUKLA <[email protected]>
+;;; Copyright © 2025 Aaron Boyd <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1546,6 +1547,37 @@ multiple local rocks trees.")
(define-public luarocks
(make-luarocks "luarocks" lua))
+(define-public dkjson
+ (package
+ (name "dkjson")
+ (version "2.8")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dkolf.de/dkjson-lua/dkjson-" version
".lua"))
+ (sha256
+ (base32 "0i3x9qzx2m25fpf1pd6j45imm1gpykpjxibbvfi9bcwgd1hg2fzb"))))
+ (build-system trivial-build-system)
+ (arguments
+ (list
+ #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (guix build utils))
+ (let* ((luajit-major+minor
+ #$(version-major+minor (package-version lua)))
+ (lua-dir
+ (string-append #$output "/share/lua/" luajit-major+minor)))
+ (mkdir-p lua-dir)
+ (copy-file #$source (string-append lua-dir "/dkjson.lua"))))))
+ (inputs (list lua))
+ (synopsis "JSON module for Lua")
+ (description
+ "dkjson is a lua module for processing json in lua. It can handle tasks
+ like encoding or decoding JSON objects to and from lua tables.")
+ (home-page "https://dkolf.de/dkjson-lua/")
+ (license license:expat)))
+
(define-public fennel
(package
(name "fennel")