summaryrefslogtreecommitdiff
path: root/nongnu/packages/steam-client.scm
diff options
context:
space:
mode:
authorison <ison@airmail.cc>2020-09-04 09:49:14 -0600
committerPierre Neidhardt <mail@ambrevar.xyz>2020-09-05 09:21:40 +0200
commitf52fe58c5c1fdf0413613cdb69546df5de840bce (patch)
tree5dac71e59e0775b14a506feb0ad43532a6f94054 /nongnu/packages/steam-client.scm
parenta7a126daff56ca30ce6c9b05290adb96ec943239 (diff)
nongnu: steam: Use format for scheme string.
* nongnu/packages/steam-client.scm (steam)[arguments]: Use format to print manifest.
Diffstat (limited to 'nongnu/packages/steam-client.scm')
-rw-r--r--nongnu/packages/steam-client.scm95
1 files changed, 49 insertions, 46 deletions
diff --git a/nongnu/packages/steam-client.scm b/nongnu/packages/steam-client.scm
index 9a05de8..69f4c66 100644
--- a/nongnu/packages/steam-client.scm
+++ b/nongnu/packages/steam-client.scm
@@ -379,14 +379,17 @@ in the Guix store"
(define (move-file old new)
(rename-file old new)
new)
- (define (write-file path str)
- (with-output-to-file path
- (lambda ()
- (let loop ((ls1 (string->list str)))
- (unless (null? ls1)
- (begin
- (write-char (car ls1))
- (loop (cdr ls1))))))))
+ (define (write-file path data)
+ (let ((str (if (list? data)
+ (format #f "~{~y~}" data)
+ data)))
+ (with-output-to-file path
+ (lambda ()
+ (let loop ((ls1 (string->list str)))
+ (unless (null? ls1)
+ (begin
+ (write-char (car ls1))
+ (loop (cdr ls1)))))))))
(let* ((out (assoc-ref outputs "out"))
(shebang (string-append "#!" (which "bash")))
(steam-real (move-file (string-append out "/bin/steam")
@@ -405,46 +408,46 @@ in the Guix store"
(python (assoc-ref inputs "python")))
(mkdir-p manifest-dir)
- (write-file manifest-path
- (string-append "
-(use-package-modules
- base certs compression file gawk gnome linux)
-(use-modules (guix utils)
- (guix profiles)
- (guix store)
- (srfi srfi-11))
+ (write-file
+ manifest-path
+ `((use-package-modules
+ base certs compression file gawk gnome linux)
+ (use-modules (guix utils)
+ (guix profiles)
+ (guix store)
+ (srfi srfi-11))
-;;; Copied from guix/scripts/package.scm
-(define (store-item->manifest-entry item)
- \"Return a manifest entry for ITEM, a \\\"/gnu/store/...\\\" file name.\"
- (let-values (((name version)
- (package-name->name+version (store-path-package-name item)
- #\\-)))
- (manifest-entry
- (name name)
- (version version)
- (output \"out\") ;XXX: wild guess
- (item item))))
+ ;; Copied from guix/scripts/package.scm.
+ (define (store-item->manifest-entry item)
+ "Return a manifest entry for ITEM, a \"/gnu/store/...\" file name."
+ (let-values (((name version)
+ (package-name->name+version (store-path-package-name item)
+ #\-)))
+ (manifest-entry
+ (name name)
+ (version version)
+ (output ,out) ;XXX: wild guess
+ (item item))))
-(manifest-add
- (packages->manifest
- (list coreutils
- diffutils
- file
- findutils
- gawk
- glibc-locales
- grep
- gzip
- nss-certs
- sed
- strace
- tar
- util-linux+udev
- which
- xz
- zenity))
- `(,(store-item->manifest-entry \"" out "\")))"))
+ (manifest-add
+ (packages->manifest
+ (list coreutils
+ diffutils
+ file
+ findutils
+ gawk
+ glibc-locales
+ grep
+ gzip
+ nss-certs
+ sed
+ strace
+ tar
+ util-linux+udev
+ which
+ xz
+ zenity))
+ `(,(store-item->manifest-entry ,out)))))
(write-file sandbox
(string-append shebang "