From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 56119-done@debbugs.gnu.org
Subject: bug#56119: [PATCH] gnu: Add phoronix-test-suite.
Date: Wed, 22 Jun 2022 10:46:23 -0400 [thread overview]
Message-ID: <87leto69j4.fsf@gmail.com> (raw)
In-Reply-To: <d5becd9fcfeb2a7824fed37f96ae97756dd7fe55.camel@telenet.be> (Maxime Devos's message of "Tue, 21 Jun 2022 11:51:28 +0200")
Hi Maxime.
Maxime Devos <maximedevos@telenet.be> writes:
> Maxim Cournoyer schreef op di 21-06-2022 om 01:20 [-0400]:
>> + (wrap-program pts
>> + (list "PATH" 'prefix
>> + (list (string-append #$(this-package-input "bash")
>> + "/bin")
>> + (string-append #$(this-package-input "coreutils")
>> + "/bin")
>> + (string-append #$(this-package-input "gzip")
>> + "/bin")
>> + (string-append #$(this-package-input "make")
>> + "/bin")
>> + (string-append #$(this-package-input "php")
>> + "/bin")
>> + (string-append #$(this-package-input "sed")
>> + "/bin")
>> + (string-append #$(this-package-input "tar")
>> + "/bin")
>> + (string-append #$(this-package-input "which")
>> + "/bin"))))))))))
>
> Can be simplified and delabelified (untested):
>
> (list "PATH" 'prefix
> (map (lambda (binary)
> (search-input-file inputs (string-append "bin/" binary)))
> '("bash" "tar" "which" "cat" "gzip" [...])))
>
> (Only looked at the phases)
Thanks. That's indeed better. I added the 'dirname' call to get the
bin directory and not the binaries themselves, as this is for PATH:
--8<---------------cut here---------------start------------->8---
modified gnu/packages/benchmark.scm
@@ -294,26 +294,15 @@ (define-public phoronix-test-suite
(lambda _
(invoke "./install-sh" #$output "--free-software-only")))
(add-after 'install 'wrap-binary
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
(let ((pts (string-append #$output "/bin/phoronix-test-suite")))
(wrap-program pts
(list "PATH" 'prefix
- (list (string-append #$(this-package-input "bash")
- "/bin")
- (string-append #$(this-package-input "coreutils")
- "/bin")
- (string-append #$(this-package-input "gzip")
- "/bin")
- (string-append #$(this-package-input "make")
- "/bin")
- (string-append #$(this-package-input "php")
- "/bin")
- (string-append #$(this-package-input "sed")
- "/bin")
- (string-append #$(this-package-input "tar")
- "/bin")
- (string-append #$(this-package-input "which")
- "/bin"))))))))))
+ (map (lambda (binary)
+ (dirname (search-input-file
+ inputs (string-append "bin/" binary))))
+ '("bash" "cat" ;coreutils
+ "gzip" "make" "php" "sed" "tar" "which"))))))))))
(build-system gnu-build-system)
(native-inputs (list python which))
;; Wrap the most basic build tools needed by Phoronix Test Suite to
build
--8<---------------cut here---------------end--------------->8---
I've now gone ahead and pushed it with the above change. With more
usage, I expect we'll probably want to capture a few more tools in the
wrap phase, such as de-compressors; we'll see.
Thanks for the comments!
Maxim
prev parent reply other threads:[~2022-06-22 14:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 5:20 [bug#56119] [PATCH] gnu: Add phoronix-test-suite Maxim Cournoyer
2022-06-21 9:51 ` Maxime Devos
2022-06-22 14:46 ` Maxim Cournoyer [this message]
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=87leto69j4.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=56119-done@debbugs.gnu.org \
--cc=maximedevos@telenet.be \
/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).