nongnu: steam: Use format for scheme string.

* nongnu/packages/steam-client.scm (steam)[arguments]: Use format to
  print manifest.
This commit is contained in:
ison 2020-09-04 09:49:14 -06:00 committed by Pierre Neidhardt
parent a7a126daff
commit f52fe58c5c
No known key found for this signature in database
GPG key ID: 9BDCF497A4BBCC7F

View file

@ -379,14 +379,17 @@ in the Guix store"
(define (move-file old new)
(rename-file old new)
new)
(define (write-file path str)
(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))))))))
(loop (cdr ls1)))))))))
(let* ((out (assoc-ref outputs "out"))
(shebang (string-append "#!" (which "bash")))
(steam-real (move-file (string-append out "/bin/steam")
@ -405,25 +408,25 @@ in the Guix store"
(python (assoc-ref inputs "python")))
(mkdir-p manifest-dir)
(write-file manifest-path
(string-append "
(use-package-modules
(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
;; Copied from guix/scripts/package.scm.
(define (store-item->manifest-entry item)
\"Return a manifest entry for ITEM, a \\\"/gnu/store/...\\\" file name.\"
"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
(output ,out) ;XXX: wild guess
(item item))))
(manifest-add
@ -444,7 +447,7 @@ in the Guix store"
which
xz
zenity))
`(,(store-item->manifest-entry \"" out "\")))"))
`(,(store-item->manifest-entry ,out)))))
(write-file sandbox
(string-append shebang "