unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Getting the name of file-like objects
@ 2022-04-01 20:29 Justin Veilleux
  2022-04-02  8:32 ` Maxime Devos
  2022-04-02 20:03 ` Liliana Marie Prikler
  0 siblings, 2 replies; 4+ messages in thread
From: Justin Veilleux @ 2022-04-01 20:29 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 779 bytes --]

Hi everyone. I'm currently writing a set of helper functions (usually 
written using `computed-file`  which act on file like objects to 
transform them in some way.
For instance, I have a `decompress` function which, given a file-like 
object pointing to an archive, will return a computed file object which 
it will decompress to it's output.
Everything works very well, but I would like to be able to name the 
`computed-file` objects something meaningfull.

```
(define (unzip f)
   (computed-file (string-append (name f) "-unzipped")
     #~(begin
         (system* (string-append #$unzip "/bin/unzip")
                  "-d" #$output
                  #$file))
          #$out))
```

Is there someting which ressembles the imaginary `name` function I used 
above?

Cheers.

[-- Attachment #2: Type: text/html, Size: 988 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-05 12:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-01 20:29 Getting the name of file-like objects Justin Veilleux
2022-04-02  8:32 ` Maxime Devos
2022-04-05 12:26   ` Ludovic Courtès
2022-04-02 20:03 ` Liliana Marie Prikler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).