From: Josselin Poiret via Bug reports for GNU Guix <bug-guix@gnu.org>
To: "Lenny Händler" <lenny@lennyhaendler.com>, 51798@debbugs.gnu.org
Cc: Josselin Poiret <dev@jpoiret.xyz>
Subject: bug#51798: [PATCH v2] gnu: bashtop: Add dependencies and wrap program with PATH
Date: Sun, 14 Nov 2021 15:19:49 +0000 [thread overview]
Message-ID: <20211114151949.19754-1-dev@jpoiret.xyz> (raw)
In-Reply-To: <20211114140137.13868-1-dev@jpoiret.xyz>
Sorry for the noise, but the patch I just sent wasn't up to
satisfaction: using `which` in the build phases breaks
cross-compilation, and the build-system change was a bit of an
unwarranted change.
Here's a modified patch!
Best,
Josselin Poiret
-- >8 --
* gnu/packages/admin.scm (bashtop): Add dependencies, wrap the script
so that it can access the commands it needs.
---
gnu/packages/admin.scm | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 2a7b0f310d..fe3987a9b8 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -674,7 +674,29 @@ (define-public bashtop
(arguments
'(#:make-flags (list (string-append "PREFIX=" %output))
#:tests? #f ; bats test fails with loading load.bash
- #:phases (modify-phases %standard-phases (delete 'configure))))
+ #:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'install 'wrap
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((path (map (lambda (input)
+ (string-append (assoc-ref inputs
+ input)
+ "/bin"))
+ '("coreutils" "gawk" "glibc" "grep"
+ "iproute" "procps" "sed")))
+ (bashtop (string-append (assoc-ref outputs
+ "out")
+ "/bin/bashtop")))
+ (wrap-program bashtop
+ `("PATH" ":" = ,path))))))))
+ (inputs
+ `(("coreutils" ,coreutils)
+ ("gawk" ,gawk)
+ ("glibc" ,glibc) ; needed for the 'locale' binary
+ ("grep" ,grep)
+ ("iproute" ,iproute)
+ ("procps" ,procps)
+ ("sed" ,sed)))
(home-page "https://github.com/aristocratos/bashtop")
(synopsis "Linux/OSX/FreeBSD resource monitor")
(description "Resource monitor that shows usage and stats for processor,
--
2.33.1
next prev parent reply other threads:[~2021-11-14 15:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 22:55 bug#51798: bashtop does not run without glibc installed in profile Lenny Händler
2021-11-14 14:01 ` bug#51798: [PATCH] gnu: bashtop: Add dependencies and wrap program with PATH Josselin Poiret via Bug reports for GNU Guix
2021-11-14 15:19 ` Josselin Poiret via Bug reports for GNU Guix [this message]
2021-11-14 21:33 ` bug#51798: [PATCH v2] " Maxime Devos
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=20211114151949.19754-1-dev@jpoiret.xyz \
--to=bug-guix@gnu.org \
--cc=51798@debbugs.gnu.org \
--cc=dev@jpoiret.xyz \
--cc=lenny@lennyhaendler.com \
/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).