From f581328141916e53a4c8999991c82a0e1b723067 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 8 Feb 2021 18:16:07 -0300 Subject: euandreh.scm: Define packages dynamically --- src/xyz/euandreh/packages/euandreh.scm | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'src/xyz/euandreh') diff --git a/src/xyz/euandreh/packages/euandreh.scm b/src/xyz/euandreh/packages/euandreh.scm index 205990d..cd9778f 100644 --- a/src/xyz/euandreh/packages/euandreh.scm +++ b/src/xyz/euandreh/packages/euandreh.scm @@ -1,4 +1,5 @@ (define-module (xyz euandreh packages euandreh) + #:use-module (json) #:use-module ((ice-9 textual-ports) #:prefix textual-ports:) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix transformations) @@ -43,16 +44,14 @@ (home-page (string-append "https://" name ".euandreh.xyz")) (license license:agpl3+))) -(define-public remembering - (euandreh-package - "remembering" - "" - "cca66c6f53e8bce857faae88368c0b07e6ace9e1" - (content-hash "1b90cpnv9p6p1cggiv6kp2q6v6lqhsv2q1zk6djnylfzzc8hszay"))) - -(define-public autoqemu - (euandreh-package - "autoqemu" - "5c44e0d0fa46ccd35c28e48849fcd5153fe41e5a" - "" - (content-hash "15zxy86dvahshrghngkb70g6bc0cvz7h547vmh4fkaxgh8zh5ahg"))) +(let* ((json-file (canonicalize-path + (string-append (current-source-directory) + "/../../../../packages.json"))) + (packages (call-with-input-file json-file json->scm))) + (map (lambda (package) + (euandreh-package + (assoc-ref package "name") + (assoc-ref package "version-prefix") + (assoc-ref package "version") + (content-hash (assoc-ref package "tarbal-sha256")))) + (vector->list (assoc-ref packages "packages")))) -- cgit v1.2.3