aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2023-12-22 07:35:44 +0000
committerArun Isaac2023-12-22 07:35:44 +0000
commit5fb163738caa16817040da55f09f8a03a95fbe58 (patch)
treeb89ba9e4f4270ac6f95a8c4256aa37857afa98f4
parenta1f3f4188ddec4c04249bf76336968deb0c1d45e (diff)
downloadguix-forge-5fb163738caa16817040da55f09f8a03a95fbe58.tar.gz
guix-forge-5fb163738caa16817040da55f09f8a03a95fbe58.tar.lz
guix-forge-5fb163738caa16817040da55f09f8a03a95fbe58.zip
environment: Introduce record type for environment variables.
* guix/forge/environment.scm: New file. * doc/forge.skb (Reference)[<environment-variable>]: Document it.
-rw-r--r--doc/forge.skb5
-rw-r--r--guix/forge/environment.scm31
2 files changed, 36 insertions, 0 deletions
diff --git a/doc/forge.skb b/doc/forge.skb
index b141bb6..fb9b0bd 100644
--- a/doc/forge.skb
+++ b/doc/forge.skb
@@ -500,6 +500,11 @@ gunicorn is run in]))))))
(chapter :title [Reference]
:ident "chapter-reference"
(description
+ (record-documentation "guix/forge/environment.scm" '<environment-variable>
+ (record-field "name"
+ [Name of the environment variable])
+ (record-field "value"
+ [Its value]))
(record-documentation "guix/forge/forge.scm" '<forge-configuration>
(record-field "projects"
[List of ,(record-ref "<forge-project>") objects describing
diff --git a/guix/forge/environment.scm b/guix/forge/environment.scm
new file mode 100644
index 0000000..d6adeae
--- /dev/null
+++ b/guix/forge/environment.scm
@@ -0,0 +1,31 @@
+;;; guix-forge --- Guix software forge meta-service
+;;; Copyright © 2023 Arun Isaac <arunisaac@systemreboot.net>
+;;;
+;;; This file is part of guix-forge.
+;;;
+;;; guix-forge is free software: you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published
+;;; by the Free Software Foundation, either version 3 of the License,
+;;; or (at your option) any later version.
+;;;
+;;; guix-forge is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with guix-forge. If not, see
+;;; <https://www.gnu.org/licenses/>.
+
+(define-module (forge environment)
+ #:use-module (guix records)
+ #:export (<environment-variable>
+ environment-variable
+ environment-variable-name
+ environment-variable-value))
+
+(define-record-type* <environment-variable>
+ environment-variable make-environment-variable
+ environment-variable?
+ (name environment-variable-name)
+ (value environment-variable-value))