diff options
author | EuAndreh <eu@euandre.org> | 2021-02-08 18:16:07 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-02-08 18:16:07 -0300 |
commit | f581328141916e53a4c8999991c82a0e1b723067 (patch) | |
tree | f128b58b4b82a775584e2ced5f20c283975d239f /src/xyz | |
parent | default.nix: Get package versions from package.json (diff) | |
download | package-repository-f581328141916e53a4c8999991c82a0e1b723067.tar.gz package-repository-f581328141916e53a4c8999991c82a0e1b723067.tar.xz |
euandreh.scm: Define packages dynamically
Diffstat (limited to '')
-rw-r--r-- | src/xyz/euandreh/packages/euandreh.scm | 25 |
1 files changed, 12 insertions, 13 deletions
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")))) |