[bug#54311,v2] gnu: tint2: Update to 17.0.2.

Message ID DM5PR04MB37727B6BF7C68A4B17C8BF5099E29@DM5PR04MB3772.namprd04.prod.outlook.com
State New
Headers
Series [bug#54311,v2] gnu: tint2: Update to 17.0.2. |

Commit Message

Jaft April 3, 2022, 3:01 a.m. UTC
  ---
Here we go, Maxime; I've switched the ~fetch~ method to =git=.

I think you're absolutely right about the =fix-installation-prefix= phase not
being necessary as "etc" isn't even in the =CMakeLists.txt= file, anymore; I had
no issues building with the phase removed, as well.

Removing not–running-tests, however, did result in a "make: *** No rule to make
target 'test'.  Stop." error, however, so I'm guessing that, while the files in
that directory are used for testing, they are not incorporated as part of the
build process and there still is no target so I've left that in.

Hopefully this addresses everything and thanks a ton for looking over this!

 gnu/packages/xdisorg.scm | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)
  

Comments

Jaft May 10, 2022, 2:05 a.m. UTC | #1
Let me know if there's any other changes needed but just a reminder that this should be ready, I think.
  
Maxime Devos May 11, 2022, 9:51 a.m. UTC | #2
Wamm K. D schreef op za 02-04-2022 om 22:01 [-0500]:
> ---
> Here we go, Maxime; I've switched the ~fetch~ method to =git=.
> 
> I think you're absolutely right about the =fix-installation-prefix= phase not
> being necessary as "etc" isn't even in the =CMakeLists.txt= file, anymore; I had
> no issues building with the phase removed, as well.
> 
> Removing not–running-tests, however, did result in a "make: *** No rule to make
> target 'test'.  Stop." error, however, so I'm guessing that, while the files in
> that directory are used for testing, they are not incorporated as part of the
> build process and there still is no target so I've left that in.

There's 'regression.py' which has a 'main' and 'run_unit_tests'.  Maybe
'regression.py' can be run in the 'check' phase?

> 
> Hopefully this addresses everything and thanks a ton for looking over this!

Looks ok (except for 'regression.py' not being run), but for
completeneess you might want to run it in a a pure environment (./pre-
inst-env guix shell --pure tint2) and look for problems like missing
icons or configuration not working or ‘warning: configuration scheme
things / file chooser’ things.

Greetings,
Maxime.
  
Jaft May 19, 2022, 4:54 a.m. UTC | #3
> On Wednesday, May 11, 2022, 04:51:19 AM CDT, Maxime Devos <maximedevos@telenet.be> wrote: 
>
>
>
>
>
> There's 'regression.py' which has a 'main' and 'run_unit_tests'.  Maybe
> 'regression.py' can be run in the 'check' phase?

Fair; would you know how to manually call it in that phase? I'm afraid I don't have any experience outside of the check phase automatically calling the designated tests files.
  
Maxime Devos May 19, 2022, 1:13 p.m. UTC | #4
Jaft schreef op do 19-05-2022 om 04:54 [+0000]:
> > 
> > 
> > There's 'regression.py' which has a 'main' and 'run_unit_tests'. 
> > Maybe
> > 'regression.py' can be run in the 'check' phase?
> 
> Fair; would you know how to manually call it in that phase? I'm
> afraid I don't have any experience outside of the check phase
> automatically calling the designated tests files.

(lambda* (#:key tests? #:allow-other-keys)
  (when tests?
    (invoke "regression.py"))) ; or maybe (invoke "python3" "regression.py")
  
Jaft May 19, 2022, 3:57 p.m. UTC | #5
> On Thursday, May 19, 2022, 08:14:11 AM CDT, Maxime Devos <maximedevos@telenet.be> wrote: 
>
>
>
>
>
> (lambda* (#:key tests? #:allow-other-keys)
>   (when tests?
>     (invoke "regression.py"))) ; or maybe (invoke "python3" "regression.py")

Awesome; thanks a ton, Maxime. I'll try this out.
  
Jaft May 22, 2022, 7:49 a.m. UTC | #6
Alright; finally got a chance to try this.

Running the file ends up failing due to line 384; it tries to call a =top= command (~top -bn5 | grep 'Cpu(s)' | grep -o '[0-9\.]* id' | cut -d ' ' -f 1~) but it's not working since "Cpu(s)" isn't anywhere in the ~top -bn5~ output. The =regression.py= file was written for Python 2 so maybe the command was written for an older version of =top=? But I dunno.
  
宋文武 Aug. 4, 2022, 2:17 a.m. UTC | #7
Jaft <jaft.r@outlook.com> writes:

> Alright; finally got a chance to try this.
>
> Running the file ends up failing due to line 384; it tries to call a
> =top= command (~top -bn5 | grep 'Cpu(s)' | grep -o '[0-9\.]* id' | cut
> -d ' ' -f 1~) but it's not working since "Cpu(s)" isn't anywhere in
> the ~top -bn5~ output. The =regression.py= file was written for Python
> 2 so maybe the command was written for an older version of =top=? But
> I dunno.

Thanks for investigating, pushed now!
  

Patch

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index d2caee85ec..a7738aac47 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -54,6 +54,7 @@ 
 ;;; Copyright © 2021 jgart <jgart@dismail.de>
 ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
+;;; Copyright © 2022 Wamm K. D. <jaft.r@outlook.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1790,27 +1791,20 @@  (define-public rofi-calc
 (define-public tint2
   (package
     (name "tint2")
-    (version "0.14.6")
+    (version "17.0.2")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://gitlab.com/o9000/" name
-                                  "/repository/archive.tar.gz?ref=" version))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url (string-append "https://gitlab.com/o9000/" name "/"))
+                    (commit version)))
               (sha256
                (base32
-                "1kwzwxy4myagybm3rc7dgynfgp75742n348qibn1p2an9ggyivda"))))
+                "123apmgs6x2zfv1q57dyl4mwqf0vsw5ndh5jsg6p3fvhr66l1aja"))))
     (build-system cmake-build-system)
     (arguments
-     '(#:tests? #f                      ;no test target
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-installation-prefix
-           (lambda _
-             (substitute* "CMakeLists.txt"
-               (("/etc") "${CMAKE_INSTALL_PREFIX}/etc"))
-             #t)))))
+     '(#:tests? #f))                      ;no test target
     (inputs
-     (list gtk+-2
+     (list gtk+
            imlib2
            librsvg
            libxcomposite