aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-08-21 10:34:32 -0300
committerEuAndreh <eu@euandre.org>2024-08-21 10:34:32 -0300
commit4cb6f2d8af3108521f40f33ac7ca83c68123eabe (patch)
treeb4964f44f53d4aed79e106b0181d7e83031662d4 /src
parentpackage.scm: Use (let ...) to simplify (etc-entries ...) function (diff)
downloadpackages-4cb6f2d8af3108521f40f33ac7ca83c68123eabe.tar.gz
packages-4cb6f2d8af3108521f40f33ac7ca83c68123eabe.tar.xz
packages.scm: Move utility functions to the beginning of the file
Diffstat (limited to 'src')
-rw-r--r--src/org/euandre/packages.scm41
1 files changed, 20 insertions, 21 deletions
diff --git a/src/org/euandre/packages.scm b/src/org/euandre/packages.scm
index 3d8a616..e39d475 100644
--- a/src/org/euandre/packages.scm
+++ b/src/org/euandre/packages.scm
@@ -138,6 +138,26 @@
+(define-public (mklist x)
+ (if (not x)
+ '()
+ (if (pair? x)
+ x
+ (list x))))
+
+(define-public (slurp path)
+ (call-with-input-file
+ path
+ textual-ports:get-string-all))
+
+(define-public (str . rest)
+ (apply string-append rest))
+
+(define-public (fmt . rest)
+ (apply format #f rest))
+
+
+
(define-public (pkg name version checksum)
(package
(name name)
@@ -348,27 +368,6 @@
-
-
-
-(define-public (mklist x)
- (if (not x)
- '()
- (if (pair? x)
- x
- (list x))))
-
-(define-public (slurp path)
- (call-with-input-file
- path
- textual-ports:get-string-all))
-
-(define-public (str . rest)
- (apply string-append rest))
-
-(define-public (fmt . rest)
- (apply format #f rest))
-
(define-public (user-accounts users)
(map (lambda (user)
(let ((name (s1:first user))