* [bug#54974] [PATCH] added btop
2022-04-16 15:37 [bug#54974] [PATCH] added btop Wil deBeest
@ 2022-04-18 13:40 ` Greg Hogan
2022-04-18 18:47 ` Maxime Devos
2022-04-18 18:02 ` Wil deBeest
` (4 subsequent siblings)
5 siblings, 1 reply; 9+ messages in thread
From: Greg Hogan @ 2022-04-18 13:40 UTC (permalink / raw)
To: Wil deBeest; +Cc: 54974
[-- Attachment #1: Type: text/plain, Size: 3211 bytes --]
Hi Wil,
I had recently looked at adding this package so I happen to have a few
comments.
v1.2.6 was released last week.
Is it preferable to "(delete 'check)" the test phase or specify the
"#:tests? #f" argument?
Instead of the "replace 'install" lambda, I had done:
#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
which is both shorter and to my understanding more generic (more adaptable
to future additional binaries or libraries, though this package will likely
only ever have a single binary).
Greg
On Sat, Apr 16, 2022 at 12:18 PM Wil deBeest <bovid-19@4tii.de> wrote:
>
> ---
> gnu/packages/admin.scm | 52 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 52 insertions(+)
>
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index 1db04adf71..68f09cdbf9 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -730,6 +730,58 @@ (define-public bpytop
> memory, disks, network and processes. It's a Python port and continuation
> of
> @command{bashtop}.")
> (license license:asl2.0)))
> +(define-public btop
> + (package
> + (name "btop")
> + (version "1.2.5")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/aristocratos/btop")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1v0lj296bzwgs29hv9z3r82fwmibiqgsvsqqh2fimxs0jmld7c2v"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (delete 'configure) ;; not provided
> + (delete 'check) ;; not provided
> + (replace 'install
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let ((bin (string-append
> + (assoc-ref outputs "out")"/bin")))
> + (install-file "bin/btop" bin)))))))
> + (home-page "https://github.com/aristocratos/btop")
> + (synopsis "Resource monitor for processor, memory, disks, network and
> processes")
> + (description "Resource monitor that shows usage and stats
> +for processor, memory, disks, network and processes.
> +
> +C++ version and continuation of bashtop and bpytop.
> +
> +Features
> +
> + Easy to use, with a game inspired menu system.
> + Full mouse support, all buttons with a highlighted key is clickable
> + and mouse scroll works in process list and menu boxes.
> + Fast and responsive UI with UP, DOWN keys process selection.
> + Function for showing detailed stats for selected process.
> + Ability to filter processes.
> + Easy switching between sorting options.
> + Tree view of processes.
> + Send any signal to selected process.
> + UI menu for changing all config file options.
> + Auto scaling graph for network usage.
> + Shows IO activity and speeds for disks
> + Battery meter
> + Selectable symbols for the graphs
> + Custom presets
> + And more...
> +")
> + (license license:asl2.0)))
>
> (define-public pies
> (package
>
> base-commit: 20645d8467852990413c1ea9cf81cec82d23defd
> --
> 2.35.1
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 4366 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#54974] [PATCH] added btop
2022-04-18 13:40 ` Greg Hogan
@ 2022-04-18 18:47 ` Maxime Devos
0 siblings, 0 replies; 9+ messages in thread
From: Maxime Devos @ 2022-04-18 18:47 UTC (permalink / raw)
To: Greg Hogan, Wil deBeest; +Cc: 54974
[-- Attachment #1: Type: text/plain, Size: 600 bytes --]
Greg Hogan schreef op ma 18-04-2022 om 09:40 [-0400]:
> Instead of the "replace 'install" lambda, I had done:
> #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs
> "out")))
> which is both shorter and to my understanding more generic (more
> adaptable to future additional binaries or libraries, though this
> package will likely only ever have a single binary).
Long term, %outputs, %build-inputs, ... are being phased out, so I'd go
with, so I'd go with
(arguments (list #:make-flags #~(string-append "PREFIX=" #$output)))
here instead.
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#54974] [PATCH] added btop
2022-04-16 15:37 [bug#54974] [PATCH] added btop Wil deBeest
2022-04-18 13:40 ` Greg Hogan
@ 2022-04-18 18:02 ` Wil deBeest
2022-04-18 18:53 ` Maxime Devos
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Wil deBeest @ 2022-04-18 18:02 UTC (permalink / raw)
To: Greg Hogan; +Cc: 54974
Greg Hogan <code@greghogan.com> writes:
> Hi Wil,
Hi Greg,
thank you for the feedback!
> I had recently looked at adding this package so I happen to have a few comments.
>
> v1.2.6 was released last week.
I had updated the package from v1.0.0 before creating the patch, but
thanks to my mail server I was only able to send it the other day.
> Is it preferable to "(delete 'check)" the test phase or specify the "#:tests? #f" argument?
I am quite new to Guix and Scheme, but `#:tests? #f' seems much better to me.
> Instead of the "replace 'install" lambda, I had done:
> #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
> which is both shorter and to my understanding more generic (more adaptable to future additional binaries or libraries, though this
> package will likely only ever have a single binary).
That's definitely neater. I'd suggest you send your patch here to
replace my hacky one, but if you prefer I could also incorporate your
improvements into mine and update the version.
Wil
> Greg
>
> On Sat, Apr 16, 2022 at 12:18 PM Wil deBeest <bovid-19@4tii.de> wrote:
>
> ---
> gnu/packages/admin.scm | 52 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 52 insertions(+)
>
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index 1db04adf71..68f09cdbf9 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -730,6 +730,58 @@ (define-public bpytop
> memory, disks, network and processes. It's a Python port and continuation of
> @command{bashtop}.")
> (license license:asl2.0)))
> +(define-public btop
> + (package
> + (name "btop")
> + (version "1.2.5")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/aristocratos/btop")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1v0lj296bzwgs29hv9z3r82fwmibiqgsvsqqh2fimxs0jmld7c2v"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (delete 'configure) ;; not provided
> + (delete 'check) ;; not provided
> + (replace 'install
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let ((bin (string-append
> + (assoc-ref outputs "out")"/bin")))
> + (install-file "bin/btop" bin)))))))
> + (home-page "https://github.com/aristocratos/btop")
> + (synopsis "Resource monitor for processor, memory, disks, network and processes")
> + (description "Resource monitor that shows usage and stats
> +for processor, memory, disks, network and processes.
> +
> +C++ version and continuation of bashtop and bpytop.
> +
> +Features
> +
> + Easy to use, with a game inspired menu system.
> + Full mouse support, all buttons with a highlighted key is clickable
> + and mouse scroll works in process list and menu boxes.
> + Fast and responsive UI with UP, DOWN keys process selection.
> + Function for showing detailed stats for selected process.
> + Ability to filter processes.
> + Easy switching between sorting options.
> + Tree view of processes.
> + Send any signal to selected process.
> + UI menu for changing all config file options.
> + Auto scaling graph for network usage.
> + Shows IO activity and speeds for disks
> + Battery meter
> + Selectable symbols for the graphs
> + Custom presets
> + And more...
> +")
> + (license license:asl2.0)))
>
> (define-public pies
> (package
>
> base-commit: 20645d8467852990413c1ea9cf81cec82d23defd
> --
> 2.35.1
--
Pascal
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#54974] [PATCH] added btop
2022-04-16 15:37 [bug#54974] [PATCH] added btop Wil deBeest
2022-04-18 13:40 ` Greg Hogan
2022-04-18 18:02 ` Wil deBeest
@ 2022-04-18 18:53 ` Maxime Devos
2022-04-18 18:55 ` Maxime Devos
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Maxime Devos @ 2022-04-18 18:53 UTC (permalink / raw)
To: Wil deBeest, 54974
[-- Attachment #1: Type: text/plain, Size: 438 bytes --]
Wil deBeest schreef op za 16-04-2022 om 17:37 [+0200]:
> + (description "Resource monitor that shows usage and stats
> +for processor, memory, disks, network and processes.
> +
> +C++
Seems like an implementation detail to me.
> version and continuation of bashtop and bpytop.
In that case, can 'bashtop' and 'bpytop' be removed now? (Using
'(deprecated-package ...) for a smooth transition).
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#54974] [PATCH] added btop
2022-04-16 15:37 [bug#54974] [PATCH] added btop Wil deBeest
` (2 preceding siblings ...)
2022-04-18 18:53 ` Maxime Devos
@ 2022-04-18 18:55 ` Maxime Devos
2022-04-28 23:17 ` Wil deBeest
2022-05-28 11:21 ` Wil deBeest
5 siblings, 0 replies; 9+ messages in thread
From: Maxime Devos @ 2022-04-18 18:55 UTC (permalink / raw)
To: Wil deBeest, 54974
[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]
Wil deBeest schreef op za 16-04-2022 om 17:37 [+0200]:
> +Features
> +
> + Easy to use, with a game inspired menu system.
> + Full mouse support, all buttons with a highlighted key is clickable
> + and mouse scroll works in process list and menu boxes.
> + Fast and responsive UI with UP, DOWN keys process selection.
What's an UP and DOWN key? I just have a regular up and down keys but
no fancy uppercase UP and DOWN keys ...
> + Function for showing detailed stats for selected process.
> + Ability to filter processes.
> + Easy switching between sorting options.
> + Tree view of processes.
> + Send any signal to selected process.
> + UI menu for changing all config file options.
> + Auto scaling graph for network usage.
> + Shows IO activity and speeds for disks
> + Battery meter
> + Selectable symbols for the graphs
> + Custom presets
> + And more...
It's a list, so you can use the Texinfo markup @itemize, @item and @end
itemize here. It's also leaning a bit towards marketing talk with the
‘and more ...’ and rather subjective ‘fast and responsive UI’, ...
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#54974] [PATCH] added btop
2022-04-16 15:37 [bug#54974] [PATCH] added btop Wil deBeest
` (3 preceding siblings ...)
2022-04-18 18:55 ` Maxime Devos
@ 2022-04-28 23:17 ` Wil deBeest
2022-04-29 9:37 ` Maxime Devos
2022-05-28 11:21 ` Wil deBeest
5 siblings, 1 reply; 9+ messages in thread
From: Wil deBeest @ 2022-04-28 23:17 UTC (permalink / raw)
To: Maxime Devos; +Cc: 54974, Greg Hogan
Hi Maxime,
> Long term, %outputs, %build-inputs, ... are being phased out, so I'd go
> with, so I'd go with
>
> (arguments (list #:make-flags #~(string-append "PREFIX=" #$output)))
>
> here instead.
I haven't been able to integrate your snippet into the package. Could you
show me how to do so or tell me which part of the handbook would be
relevant?
> can 'bashtop' and 'bpytop' be removed now? (Using
> '(deprecated-package ...) for a smooth transition).
The projects are all by the same developer and bashtop hasn't changed in two years, so the assumption that the rewrites supersede the older implementations doesn't seem farfetched.
> What's an UP and DOWN key? I just have a regular up and down keys but
> no fancy uppercase UP and DOWN keys ...
> [...]
> It's a list, so you can use the Texinfo markup @itemize, @item and @end
> itemize here. It's also leaning a bit towards marketing talk with the
> ‘and more ...’ and rather subjective ‘fast and responsive UI’, ...
That was just copy & paste, I had forgotten about cut ;)
Cheers
Wil
|--------------------------|
| [PATCH] added btop 1.2.6 |
|--------------------------|
---
gnu/packages/admin.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index a200050d97..7b2e9660e1 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -752,6 +752,36 @@ (define-public bpytop
@command{bashtop}.")
(license license:asl2.0)))
+(define-public btop
+ (package
+ (name "btop")
+ (version "1.2.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/aristocratos/btop")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "03nd34q1w01visd2bg7mxrcjn0s6lnbm4s0vsfsj2mfv1rvyjl5b"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ (list (string-append "PREFIX=" %output))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))
+ #:tests? #f))
+ (home-page "https://github.com/aristocratos/btop")
+ (synopsis "Resource monitor")
+ (description "Resource monitor that shows usage and stats
+for processor, memory, disks, network and processes.
+
+C++ version and continuation of bashtop and bpytop.")
+ (license license:asl2.0)))
+
(define-public pies
(package
(name "pies")
base-commit: 882cacc1bb5be0df334dd7ce55b385a3a1678728
--
2.35.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [bug#54974] [PATCH] added btop
2022-04-28 23:17 ` Wil deBeest
@ 2022-04-29 9:37 ` Maxime Devos
0 siblings, 0 replies; 9+ messages in thread
From: Maxime Devos @ 2022-04-29 9:37 UTC (permalink / raw)
To: Wil deBeest; +Cc: 54974, Greg Hogan
[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]
Wil deBeest schreef op vr 29-04-2022 om 01:17 [+0200]:
> Hi Maxime,
>
> > Long term, %outputs, %build-inputs, ... are being phased out, so I'd go
> > with, so I'd go with
> >
> > (arguments (list #:make-flags #~(string-append "PREFIX=" #$output)))
> >
> > here instead.
>
> I haven't been able to integrate your snippet into the package. Could you
> show me how to do so or tell me which part of the handbook would be
> relevant?
For a good example, see the 'stress-ng' package definition 'guix edit
stress-ng'. #:make-flags is documented in the manual (search for
#:make-flags or go to (guix)Build Systems). #$output is documented in
‘(guix)G-Expressions’.
Very concretely:
(package
[...]
(arguments (list #:tests? #false ; some comment
#:make-flags #~(...)
#:phases
;; [Stuff for replacing the install phase and
;; removing the configure phase]
#~(modify-phases %standard-phases ...))))
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#54974] [PATCH] added btop
2022-04-16 15:37 [bug#54974] [PATCH] added btop Wil deBeest
` (4 preceding siblings ...)
2022-04-28 23:17 ` Wil deBeest
@ 2022-05-28 11:21 ` Wil deBeest
5 siblings, 0 replies; 9+ messages in thread
From: Wil deBeest @ 2022-05-28 11:21 UTC (permalink / raw)
To: Maxime Devos; +Cc: 54974, Greg Hogan
Maxime Devos <maximedevos@telenet.be> writes:
> [[PGP Signed Part:Undecided]]
> Wil deBeest schreef op vr 29-04-2022 om 01:17 [+0200]:
>> Hi Maxime,
>>> Long term, %outputs, %build-inputs, ... are being phased out, so I'd go
>>> with, so I'd go with
>>> (arguments (list #:make-flags #~(string-append "PREFIX=" #$output)))
>>> here instead.
>> I haven't been able to integrate your snippet into the package. Could you
>> show me how to do so or tell me which part of the handbook would be
>> relevant?
>
> For a good example, see the 'stress-ng' package definition 'guix edit
> stress-ng'. #:make-flags is documented in the manual (search for
> #:make-flags or go to (guix)Build Systems). #$output is documented in
> ‘(guix)G-Expressions’.
>
> Very concretely:
>
> (package
> [...]
> (arguments (list #:tests? #false ; some comment
> #:make-flags #~(...)
> #:phases
> ;; [Stuff for replacing the install phase and
> ;; removing the configure phase]
> #~(modify-phases %standard-phases ...))))
>
> Greetings,
> Maxime.
>
> [[End of PGP Signed Part]]
Thank you, I think I got it.
I've also added gcc-12 as a native input for efficiency reasons [1].
Since I'm not familiar with the process of deprecation, I've kept the thoughts I had written down regarding your question on whether bashtop & bpytop could be removed, even though there's probably nothing in there that hasn't at least been discussed before [2]
Cheers!
---
gnu/packages/admin.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index af75dee697..fccc0e8dd3 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -101,6 +101,7 @@ (define-module (gnu packages admin)
#:use-module (gnu packages file)
#:use-module (gnu packages flex)
#:use-module (gnu packages gawk)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
@@ -752,6 +753,37 @@ (define-public bpytop
@command{bashtop}.")
(license license:asl2.0)))
+(define-public btop
+ (package
+ (name "btop")
+ (version "1.2.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/aristocratos/btop")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "03nd34q1w01visd2bg7mxrcjn0s6lnbm4s0vsfsj2mfv1rvyjl5b"))))
+ (native-inputs (list gcc-12))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:make-flags
+ #~(list (string-append "PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure))
+ #:tests? #f))
+ (home-page "https://github.com/aristocratos/btop")
+ (synopsis "Resource monitor")
+ (description "Resource monitor that shows usage and stats
+for processor, memory, disks, network and processes.
+
+C++ version and continuation of bashtop and bpytop.")
+ (license license:asl2.0)))
+
(define-public pies
(package
(name "pies")
base-commit: 6e9d99f97f15347f44df0518faa5e3b8b9d5184e
--
2.36.1
[1] "Needs GCC 10 or higher, (GCC 11 or above strongly recommended for
better CPU efficiency in the compiled binary)", sayeth the readme
[2] Is there a mechanism to flag these packages so a deprecation warning
would be shown when they are searched for? (A first look seems to
suggest `gexp->derivation' could be used for that, but I'll have read
that more thoroughly)
If there is I think it would make sense to add a deprecation warning
including that reasons why they shouldn't be replaced can be directed to
e.g. 54974@debbugs.gnu.org and wait for feedback for some set amount of
time before either redefining the package names as aliases for btop or
removing them. In both cases I think a message would make sense for
those who have installed them. For others, adding something like
"replaces its predecessors bashtop and bpytop" to the description seems
to be enough.
^ permalink raw reply related [flat|nested] 9+ messages in thread