diff mbox series

[bug#39229,7/7] gnu: Add ksystemlog.

Message ID 20200121212746.16054-7-h.goebel@crazy-compilers.com
State Accepted
Headers show
Series None | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Hartmut Goebel Jan. 21, 2020, 9:27 p.m. UTC
* gnu/packages/kde-systemtools.scm (ksystemlog): New variable.
---
 gnu/packages/kde-systemtools.scm | 47 ++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

Comments

Danny Milosavljevic Jan. 21, 2020, 10:43 p.m. UTC | #1
Hi Harmut,

On Tue, 21 Jan 2020 22:27:46 +0100
Hartmut Goebel <h.goebel@crazy-compilers.com> wrote:

> +    (build-system qt-build-system)

> +         (add-before 'check 'check-setup
> +           (lambda _
> +             (setenv "QT_QPA_PLATFORM" "offscreen")
> +             #t)))))

Hmm, would it make sense to do that automatically in qt-build-system ?
Hartmut Goebel Jan. 22, 2020, 8:44 a.m. UTC | #2
Hi Danny,

(forwarding to guix-devel to eventually get more opinions on this)

Am 21.01.20 um 23:43 schrieb Danny Milosavljevic:
>> +         (add-before 'check 'check-setup
>> +           (lambda _
>> +             (setenv "QT_QPA_PLATFORM" "offscreen")
>> +             #t)))))
> Hmm, would it make sense to do that automatically in qt-build-system ?

I would be fine with this, since I find myself adding this snippet quite
often when building Qt/KDE applications. But there *might* be cases,
where tests fail due to this setting. (While I'm not aware of one, I
could imaging some test checks whether it is actually painting.)

Thus I propose implementing this in some way to easily disable it if
required: Either

- by adding this a new phase (as in the snippet shown above), so it can
easily be disabled

- by adding another keyword-argument (proposal: `#:qpa-platform`,
default: "offscreen", if +f, will not be set.

WDYT?
Mike Rosset Jan. 22, 2020, 9:20 a.m. UTC | #3
Hartmut Goebel writes:

> Hi Danny,
>
> (forwarding to guix-devel to eventually get more opinions on this)
>
> Am 21.01.20 um 23:43 schrieb Danny Milosavljevic:
>>> +         (add-before 'check 'check-setup
>>> +           (lambda _
>>> +             (setenv "QT_QPA_PLATFORM" "offscreen")
>>> +             #t)))))
>> Hmm, would it make sense to do that automatically in qt-build-system ?
>
> I would be fine with this, since I find myself adding this snippet quite
> often when building Qt/KDE applications. But there *might* be cases,
> where tests fail due to this setting. (While I'm not aware of one, I
> could imaging some test checks whether it is actually painting.)
>
> Thus I propose implementing this in some way to easily disable it if
> required: Either
>
> - by adding this a new phase (as in the snippet shown above), so it can
> easily be disabled
>
> - by adding another keyword-argument (proposal: `#:qpa-platform`,
> default: "offscreen", if +f, will not be set.
>
> WDYT?


I think adding this to qt-build-system with the keywords is a good
suggestion.

++

Mike
Efraim Flashner Jan. 22, 2020, 9:24 a.m. UTC | #4
On Wed, Jan 22, 2020 at 09:44:02AM +0100, Hartmut Goebel wrote:
> Hi Danny,
> 
> (forwarding to guix-devel to eventually get more opinions on this)
> 
> Am 21.01.20 um 23:43 schrieb Danny Milosavljevic:
> >> +         (add-before 'check 'check-setup
> >> +           (lambda _
> >> +             (setenv "QT_QPA_PLATFORM" "offscreen")
> >> +             #t)))))
> > Hmm, would it make sense to do that automatically in qt-build-system ?
> 

I was about to suggest this.
(ins)efraim@E5400 ~/workspace/guix$ grep QT_QPA_PLATFORM\" gnu/packages/kde*scm | wc -l
41
(ins)efraim@E5400 ~/workspace/guix$ grep define-public gnu/packages/kde*scm | wc -l
124
(ins)efraim@E5400 ~/workspace/guix$ grep qt-build-system gnu/packages/kde*scm | wc -l
27


> I would be fine with this, since I find myself adding this snippet quite
> often when building Qt/KDE applications. But there *might* be cases,
> where tests fail due to this setting. (While I'm not aware of one, I
> could imaging some test checks whether it is actually painting.)
> 
> Thus I propose implementing this in some way to easily disable it if
> required: Either
> 
> - by adding this a new phase (as in the snippet shown above), so it can
> easily be disabled
> 
> - by adding another keyword-argument (proposal: `#:qpa-platform`,
> default: "offscreen", if +f, will not be set.
> 
> WDYT?
> 

I like a new phase before the 'check phase. Are there other things we'd
want to add? Looking through kde-framworks.scm the only one I'd feel
comfortable adding would be the TZ ones.
diff mbox series

Patch

diff --git a/gnu/packages/kde-systemtools.scm b/gnu/packages/kde-systemtools.scm
index bffb34c7da..9a87dcb187 100644
--- a/gnu/packages/kde-systemtools.scm
+++ b/gnu/packages/kde-systemtools.scm
@@ -271,3 +271,50 @@  invited, and will ask for confirmation when a user attempts to connect.
 This package is part of the KDE networking module.")
     (license ;; GPL for programs, LGPL for libraries, FDL for documentation
      (list license:gpl2+ license:lgpl2.0+ license:fdl1.2+))))
+
+(define-public ksystemlog
+  (package
+    (name "ksystemlog")
+    (version "19.08.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/applications/" version
+                           "/src/ksystemlog-" version ".tar.xz"))
+       (sha256
+        (base32 "079r2xnj168y9kz37rhxr3rcwh6fksljsj1ihmi7f7a8wmdabz4p"))))
+    (build-system qt-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("kdoctools" ,kdoctools)))
+    (inputs
+     ;; Not including Journald since this is not used in guix
+     `(("karchive" ,karchive)
+       ("kcompletion" ,kcompletion)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("ki18n" ,ki18n)
+       ("kiconthemes" ,kiconthemes)
+       ("kio" ,kio)
+       ("kitemviews" ,kitemviews)
+       ("ktextwidgets" ,ktextwidgets)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kxmlgui" ,kxmlgui)
+       ("oxygen-icons" ,oxygen-icons) ;; default icon set
+       ("qtbase" ,qtbase)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t)))))
+    (home-page "https://kde.org/applications/system/org.kde.ksystemlog")
+    (synopsis "System log viewer")
+    (description "This program is developed for being used by beginner users,
+which don't know how to find information about their Linux system, and how the
+log files are in their computer.  But it is also designed for advanced users,
+who want to quickly see problems occuring on their server.
+
+This package is part of the KDE administration module.")
+    (license license:gpl2+)))