GNU bug report logs - #51798
bashtop does not run without glibc installed in profile

Previous Next

Package: guix;

Reported by: Lenny Händler <lenny <at> lennyhaendler.com>

Date: Sat, 13 Nov 2021 00:37:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Lenny Händler <lenny <at> lennyhaendler.com>, 51798 <at> debbugs.gnu.org
Cc: Josselin Poiret <dev <at> 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
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





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

Previous Next


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