diff mbox series

[bug#54974] added btop

Message ID 3D9386AF-4BB9-4C79-B170-A6A2AEC13728@4tii.de
State Accepted
Headers show
Series [bug#54974] added btop | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Wil deBeest April 16, 2022, 3:37 p.m. UTC

---
gnu/packages/admin.scm | 52 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)


base-commit: 20645d8467852990413c1ea9cf81cec82d23defd

Comments

Greg Hogan April 18, 2022, 1:40 p.m. UTC | #1
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
>
>
>
>
Wil deBeest April 18, 2022, 6:02 p.m. UTC | #2
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
M April 18, 2022, 6:47 p.m. UTC | #3
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.
M April 18, 2022, 6:53 p.m. UTC | #4
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.
M April 18, 2022, 6:55 p.m. UTC | #5
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.
diff mbox series

Patch

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