From: Arun Isaac <arunisaac@systemreboot.net>
To: 26275@debbugs.gnu.org
Subject: bug#26275: [PATCH] build: perl-build-system: Add `wrap' phase.
Date: Tue, 28 Mar 2017 20:03:13 +0530 [thread overview]
Message-ID: <f5525e2f.AEAAIZKx6N0AAAAAAAAAAAOwQVoAAAACwQwAAAAAAAW9WABY2nQ0@mailjet.com> (raw)
In-Reply-To: <20170327193850.12655-1-arunisaac@systemreboot.net>
> +(define* (wrap #:key inputs outputs #:allow-other-keys)
> + (define (list-of-files dir)
> + (map (cut string-append dir "/" <>)
> + (or (scandir dir (lambda (f)
> + (let ((s (stat (string-append dir "/" f))))
> + (eq? 'regular (stat:type s)))))
> + '())))
> +
> + (define bindirs
> + (append-map (match-lambda
> + ((_ . dir)
> + (list (string-append dir "/bin")
> + (string-append dir "/sbin"))))
> + outputs))
> +
> + (let* ((out (assoc-ref outputs "out"))
> + (var `("PERL5LIB" prefix
> + ,(search-path-as-string->list
> + (or (getenv "PERL5LIB") "")))))
> + (for-each (lambda (dir)
> + (let ((files (list-of-files dir)))
> + (for-each (cut wrap-program <> var)
> + files)))
> + bindirs)))
I copied this wrap function from the python build system, and modified
it a little to suite perl. Is there any reason `list-of-files' and
`bindirs' are initialized using `define' rather than a `let' binding?
This is probably a very basic Guile question, but still...
Thanks,
Arun Isaac.
next prev parent reply other threads:[~2017-03-28 14:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170327193850.12655-1-arunisaac@systemreboot.net>
2017-03-27 19:49 ` bug#26275: [PATCH] build: perl-build-system: Add `wrap' phase Arun Isaac
2017-03-28 14:33 ` Arun Isaac [this message]
2017-04-10 21:53 ` Ludovic Courtès
2017-03-27 19:38 Arun Isaac
2017-03-28 15:18 ` Marius Bakke
2017-03-28 17:02 ` Arun Isaac
2017-06-02 16:33 ` Ludovic Courtès
2017-06-02 17:40 ` Arun Isaac
2020-11-16 18:03 ` Jonathan Brielmaier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f5525e2f.AEAAIZKx6N0AAAAAAAAAAAOwQVoAAAACwQwAAAAAAAW9WABY2nQ0@mailjet.com \
--to=arunisaac@systemreboot.net \
--cc=26275@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).