mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2025-02-18 10:24:39 +01:00
nongnu: steam: Use format for scheme string.
* nongnu/packages/steam-client.scm (steam)[arguments]: Use format to print manifest.
This commit is contained in:
parent
a7a126daff
commit
f52fe58c5c
1 changed files with 49 additions and 46 deletions
|
@ -379,14 +379,17 @@ in the Guix store"
|
||||||
(define (move-file old new)
|
(define (move-file old new)
|
||||||
(rename-file old new)
|
(rename-file old new)
|
||||||
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
|
(with-output-to-file path
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let loop ((ls1 (string->list str)))
|
(let loop ((ls1 (string->list str)))
|
||||||
(unless (null? ls1)
|
(unless (null? ls1)
|
||||||
(begin
|
(begin
|
||||||
(write-char (car ls1))
|
(write-char (car ls1))
|
||||||
(loop (cdr ls1))))))))
|
(loop (cdr ls1)))))))))
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(shebang (string-append "#!" (which "bash")))
|
(shebang (string-append "#!" (which "bash")))
|
||||||
(steam-real (move-file (string-append out "/bin/steam")
|
(steam-real (move-file (string-append out "/bin/steam")
|
||||||
|
@ -405,25 +408,25 @@ in the Guix store"
|
||||||
(python (assoc-ref inputs "python")))
|
(python (assoc-ref inputs "python")))
|
||||||
|
|
||||||
(mkdir-p manifest-dir)
|
(mkdir-p manifest-dir)
|
||||||
(write-file manifest-path
|
(write-file
|
||||||
(string-append "
|
manifest-path
|
||||||
(use-package-modules
|
`((use-package-modules
|
||||||
base certs compression file gawk gnome linux)
|
base certs compression file gawk gnome linux)
|
||||||
(use-modules (guix utils)
|
(use-modules (guix utils)
|
||||||
(guix profiles)
|
(guix profiles)
|
||||||
(guix store)
|
(guix store)
|
||||||
(srfi srfi-11))
|
(srfi srfi-11))
|
||||||
|
|
||||||
;;; Copied from guix/scripts/package.scm
|
;; Copied from guix/scripts/package.scm.
|
||||||
(define (store-item->manifest-entry item)
|
(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)
|
(let-values (((name version)
|
||||||
(package-name->name+version (store-path-package-name item)
|
(package-name->name+version (store-path-package-name item)
|
||||||
#\\-)))
|
#\-)))
|
||||||
(manifest-entry
|
(manifest-entry
|
||||||
(name name)
|
(name name)
|
||||||
(version version)
|
(version version)
|
||||||
(output \"out\") ;XXX: wild guess
|
(output ,out) ;XXX: wild guess
|
||||||
(item item))))
|
(item item))))
|
||||||
|
|
||||||
(manifest-add
|
(manifest-add
|
||||||
|
@ -444,7 +447,7 @@ in the Guix store"
|
||||||
which
|
which
|
||||||
xz
|
xz
|
||||||
zenity))
|
zenity))
|
||||||
`(,(store-item->manifest-entry \"" out "\")))"))
|
`(,(store-item->manifest-entry ,out)))))
|
||||||
|
|
||||||
(write-file sandbox
|
(write-file sandbox
|
||||||
(string-append shebang "
|
(string-append shebang "
|
||||||
|
|
Loading…
Add table
Reference in a new issue