summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorAaron1371 <aaron.boyd.org@gmail.com>2025-09-28 15:28:12 -0600
committerCayetano Santos <csantosb@inventati.org>2026-01-29 20:13:26 +0100
commit147767904e828371e17f8a2900150c313491dee0 (patch)
tree0c48ae42a1c5cc6f43435e9491374c0302bae726 /gnu
parent7572a7b9bb630badfd3d931a694505a2c0022927 (diff)
gnu: Add dkjson.
* gnu/packages/lua.scm (dkjson): New variable. Merges guix/guix!1267 Change-Id: I7b804adf9832888d35b9432e086dee432fd1704d Signed-off-by: Cayetano Santos <csantosb@inventati.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/lua.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 0c89dab2cde..20e091918ff 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -25,6 +25,7 @@
;;; Copyright © 2024, 2026 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2025 Zheng Junjie <z572@z572.online>
;;; Copyright © 2025 Ashish SHUKLA <ashish.is@lostca.se>
+;;; Copyright © 2025 Aaron Boyd <aaron.boyd.org@gmail.com>
;;;
;;; 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")