GNU bug report logs - #53676
[PATCH 0/5] *** PulseAudio service improvements ***

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Tue, 1 Feb 2022 04:15:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #136 received at 53676 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 53676 <at> debbugs.gnu.org
Subject: Re: [bug#53676] [PATCH v2 3/4] services: pulseaudio: Add an
 extra-script-files configuration field.
Date: Thu, 24 Feb 2022 19:53:34 +0100
[Message part 1 (text/plain, inline)]
Maxim Cournoyer schreef op do 24-02-2022 om 11:38 [-0500]:
> +  (define (file-like->name file)
> +    (match file
> +      ((? local-file?)
> +       (local-file-name file))
> +      ((? plain-file?)
> +       (plain-file-name file))
> +      ((? computed-file?)
> +       (computed-file-name file))
> +      (_ (leave (G_ "~a is not a local-file, plain-file or \
> +computed-file object~%") file))))

This would not work with things like '(file-append ...)'.
Perhaps 'extra-script-files->file-union' can be made more general
by creating a variant of 'file-union' for this use case?
Maybe something like (untested):

;; Based on 'file-union'
(define* (file-directory . files)
  ; files: (file-like1 file-like2 ...)
  (computed-file name
                 (with-imported-modules '((guix build utils))
                   (gexp
                    (begin
                      (use-modules (guix build utils))

                      (mkdir (ungexp output))
                      (chdir (ungexp output))
                      (ungexp-splicing
                       (map (lambda (source)
                              (gexp
                               (let ((target (basename source))
                                 ;; Stat the source to abort early if it does
                                 ;; not exist.
                                 (stat (ungexp source))
                                 (symlink (ungexp source) (ungexp target)))))
                            files)))))))

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 112 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.