[PATCH] gnu: Add libxapp.

  • Done
  • quality assurance status badge
Details
2 participants
  • Wamm K. D
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
Wamm K. D
Severity
normal
W
W
Wamm K. D wrote on 24 Dec 2022 08:30
(address . guix-patches@gnu.org)(name . Wamm K. D)(address . jaft.r@outlook.com)
BY5PR07MB70293260AAFFF2041C5EB0E499EE9@BY5PR07MB7029.namprd07.prod.outlook.com
* gnu/packages/cinnamon.scm (libxapp): New variable.
---
I wasn't sure where to put this as, while definitely used by Cinnamon,
I think this is used by Mate, as well (and possibly XFCE?). I don't
know if a mint.scm file might make any sense as it's quite literally
under the Linux Mint repo. account? If it would be better to place
this elsewhere, just let me know and I'll adjust.

gnu/packages/cinnamon.scm | 72 +++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)

Toggle diff (92 lines)
diff --git a/gnu/packages/cinnamon.scm b/gnu/packages/cinnamon.scm
index fe33e797e4..c1f258c18d 100644
--- a/gnu/packages/cinnamon.scm
+++ b/gnu/packages/cinnamon.scm
@@ -26,6 +26,7 @@ (define-module (gnu packages cinnamon)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
+ #:use-module (gnu packages admin)
#:use-module (gnu packages autotools)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
@@ -37,6 +38,77 @@ (define-module (gnu packages cinnamon)
#:use-module (gnu packages python)
#:use-module (gnu packages xorg))
+(define-public libxapp
+ (package
+ (name "libxapp")
+ (version "2.4.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/linuxmint/xapp/")
+ (commit version)))
+ (sha256
+ (base32
+ "0cy9g0zqcbx9zscc9qavqmghfyfb8244cg299llv1ha8n6mpxl3s"))))
+ (build-system meson-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'set-gtk-module-path
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* "libxapp/meson.build"
+ (("gtk3_dep\\.get_pkgconfig_variable[(]'libdir'[)]")
+ (string-append "'" (assoc-ref outputs "out") "/lib'")))
+
+ (substitute* "pygobject/meson.build"
+ (("get_option[(]'py-overrides-dir'[)]")
+ (string-append "'"
+ (assoc-ref outputs "out")
+ "/lib/python"
+ #$(version-major+minor (package-version python))
+ "/site-packages/gi/overrides'")))
+
+ (substitute* "scripts/pastebin"
+ (("'nc'") (string-append "'"
+ (assoc-ref inputs "netcat")
+ "/bin/nc'")))
+
+ (substitute* "scripts/upload-system-info"
+ (("'inxi'") (string-append "'"
+ (assoc-ref inputs "inxi-minimal")
+ "/bin/inxi'"))
+ (("'/usr/bin/pastebin'") (string-append "'"
+ (assoc-ref outputs "out")
+ "/bin/pastebin'"))
+ (("'xdg-open'") (string-append "'"
+ (assoc-ref inputs "xdg-utils")
+ "/bin/xdg-open'"))))))))
+ (inputs
+ (list dbus
+ glib ; for gio
+ gtk+
+ inxi-minimal ; used by upload-system-info
+ libdbusmenu
+ libgnomekbd
+ netcat ; used by pastebin
+ xdg-utils ; used by upload-system-info
+ ))
+ (native-inputs
+ (list gettext-minimal
+ `(,glib "bin") ; for glib-mkenums
+ gobject-introspection
+ pkg-config
+ python
+ python-pygobject
+ vala))
+ (home-page "https://github.com/linuxmint/xapp")
+ (synopsis "Cross-desktop libraries and common resources for X-apps")
+ (description
+ "The components which are common to multiple GTK desktop environments
+(Cinnamon, MATE and Xfce) and required to implement cross-DE solutions.")
+ (license license:lgpl3)))
+
(define-public cinnamon-desktop
(package
(name "cinnamon-desktop")
--
2.38.1
L
L
Liliana Marie Prikler wrote on 24 Dec 2022 11:35
d2275b0a35253929184daa4eca9dcbc5344fde8c.camel@gmail.com
Am Samstag, dem 24.12.2022 um 01:30 -0600 schrieb Wamm K. D:
Toggle quote (8 lines)
> * gnu/packages/cinnamon.scm (libxapp): New variable.
> ---
> I wasn't sure where to put this as, while definitely used by
> Cinnamon,
> I think this is used by Mate, as well (and possibly XFCE?). I don't
> know if a mint.scm file might make any sense as it's quite literally
> under the Linux Mint repo. account? If it would be better to place
> this elsewhere, just let me know and I'll adjust.
I think it's in the right location.
Toggle quote (54 lines)
>
>  gnu/packages/cinnamon.scm | 72
> +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 72 insertions(+)
>
> diff --git a/gnu/packages/cinnamon.scm b/gnu/packages/cinnamon.scm
> index fe33e797e4..c1f258c18d 100644
> --- a/gnu/packages/cinnamon.scm
> +++ b/gnu/packages/cinnamon.scm
> @@ -26,6 +26,7 @@ (define-module (gnu packages cinnamon)
>    #:use-module (guix utils)
>    #:use-module (guix build-system gnu)
>    #:use-module (gnu packages)
> +  #:use-module (gnu packages admin)
>    #:use-module (gnu packages autotools)
>    #:use-module (gnu packages freedesktop)
>    #:use-module (gnu packages gettext)
> @@ -37,6 +38,77 @@ (define-module (gnu packages cinnamon)
>    #:use-module (gnu packages python)
>    #:use-module (gnu packages xorg))
>  
> +(define-public libxapp
> +  (package
> +    (name "libxapp")
> +    (version "2.4.2")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/linuxmint/xapp/")
> +                    (commit version)))
> +              (sha256
> +               (base32
> +               
> "0cy9g0zqcbx9zscc9qavqmghfyfb8244cg299llv1ha8n6mpxl3s"))))
> +    (build-system meson-build-system)
> +    (arguments
> +     (list
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (add-before 'configure 'set-gtk-module-path
> +            (lambda* (#:key inputs outputs #:allow-other-keys)
> +              (substitute* "libxapp/meson.build"
> +                (("gtk3_dep\\.get_pkgconfig_variable[(]'libdir'[)]")
> +                 (string-append "'" (assoc-ref outputs "out")
> "/lib'")))
> +
> +              (substitute* "pygobject/meson.build"
> +                (("get_option[(]'py-overrides-dir'[)]")
> +                 (string-append "'"
> +                                (assoc-ref outputs "out")
> +                                "/lib/python"
> +                                #$(version-major+minor (package-
> version python))
> +                                "/site-packages/gi/overrides'")))
I think python-build-system has a function to get this version in a
more reliable way.

Toggle quote (4 lines)
> +              (substitute* "scripts/pastebin"
> +                (("'nc'") (string-append "'"
> +                                         (assoc-ref inputs "netcat")
> +                                         "/bin/nc'")))
Use search-input-file.
Toggle quote (5 lines)
> +              (substitute* "scripts/upload-system-info"
> +                (("'inxi'") (string-append "'"
> +                                           (assoc-ref inputs "inxi-
> minimal")
> +                                           "/bin/inxi'"))
Use search-input-file.
Toggle quote (5 lines)
> +                (("'/usr/bin/pastebin'") (string-append "'"
> +                                                        (assoc-ref
> outputs "out")
> +                                                       
> "/bin/pastebin'"))
Oof, fine, but note that you can also write #$output
Toggle quote (5 lines)
> +                (("'xdg-open'") (string-append "'"
> +                                               (assoc-ref inputs
> "xdg-utils")
> +                                               "/bin/xdg-
> open'"))))))))
Use search-input-file.
Toggle quote (26 lines)
> +    (inputs
> +     (list dbus
> +           glib ; for gio
> +           gtk+
> +           inxi-minimal ; used by upload-system-info
> +           libdbusmenu
> +           libgnomekbd
> +           netcat ; used by pastebin
> +           xdg-utils ; used by upload-system-info
> +           ))
> +    (native-inputs
> +     (list gettext-minimal
> +           `(,glib "bin") ; for glib-mkenums
> +           gobject-introspection
> +           pkg-config
> +           python
> +           python-pygobject
> +           vala))
> +    (home-page "https://github.com/linuxmint/xapp")
> +    (synopsis "Cross-desktop libraries and common resources for X-
> apps")
> +    (description
> +     "The components which are common to multiple GTK desktop
> environments
> +(Cinnamon, MATE and Xfce) and required to implement cross-DE
> solutions.")
The description should consist of full sentences.
Also, since X-Apps are quite specific to Linux Mint, you should
probably not take folks knowing what they are for granted.
Toggle quote (1 lines)
> +    (license license:lgpl3)))
No +?

Cheers
J
BY5PR07MB702991C35E3780D3A3534E8099EE9@BY5PR07MB7029.namprd07.prod.outlook.com
On Saturday, December 24, 2022 at 04:36:02 AM CST, Liliana Marie Prikler <liliana.prikler@gmail.com> wrote:

Am Samstag, dem 24.12.2022 um 01:30 -0600 schrieb Wamm K. D:
Toggle quote (11 lines)
> > +              (substitute* "pygobject/meson.build"
> > +                (("get_option[(]'py-overrides-dir'[)]")
> > +                 (string-append "'"
> > +                                (assoc-ref outputs "out")
> > +                                "/lib/python"
> > +                                #$(version-major+minor (package-
> > version python))
> > +                                "/site-packages/gi/overrides'")))
> I think python-build-system has a function to get this version in a
> more reliable way.

Would you possibly know any more details on it? Just looking through the module, I don't see any functions regarding version number, I'm afraid, and it's not intuitive to me how I might use it in this context if I'm using a different build system for the package.

Toggle quote (7 lines)
> > +                (("'/usr/bin/pastebin'") (string-append "'"
> > +                                                        (assoc-ref
> > outputs "out")
> > +                                                       
> > "/bin/pastebin'"))
> Oof, fine, but note that you can also write #$output

Fair; I'd thought about it but the example I was working off of was using G-expressions and did it this way so I just went with it.

Something I've wondered: is there a point to having the lambda arguments be "#:key outputs", if you can just use "#$output"? I've seen a few setup their lambda that way only to use "#$output" and not ever use "outputs".

I may just be missing something regarding G-expressions, though.

Toggle quote (11 lines)
> > +    (synopsis "Cross-desktop libraries and common resources for X-
> > apps")
> > +    (description
> > +     "The components which are common to multiple GTK desktop
> > environments
> > +(Cinnamon, MATE and Xfce) and required to implement cross-DE
> > solutions.")
> The description should consist of full sentences.
> Also, since X-Apps are quite specific to Linux Mint, you should
> probably not take folks knowing what they are for granted.

True but is there any easy way to specify what they're related to without making it much longer than just a synopsis?

"Cross-desktop libraries and common resources" can apply to many things and is generic to the point of being unhelpful, I'd think.

I could always do "developed by Linux Mint" instead of "for X-apps" which might be more familiar but, again, it borders to being unhelpfully unspecific, again (even if less so), to me; there are probably a lot of "Cross-desktop libraries and common resources" developed by Linux Mint. This particular library was developed for use with the X-apps they're developing, specifically.

I'm just not sure what other description would work while still being a synopsis.

Toggle quote (3 lines)
> > +    (license license:lgpl3)))
> No +?

Mmm; I didn't think so but you raise a good point. Lemme double check myself; I'll adjust it, if otherwise.
L
L
Liliana Marie Prikler wrote on 24 Dec 2022 15:13
a5f874e3d17fe9c3f2177ed9d6c5dd825d2c8db4.camel@gmail.com
Am Samstag, dem 24.12.2022 um 11:23 +0000 schrieb Jaft:
Toggle quote (21 lines)
>  On Saturday, December 24, 2022 at 04:36:02 AM CST, Liliana Marie
> Prikler <liliana.prikler@gmail.com> wrote:
>
> Am Samstag, dem 24.12.2022 um 01:30 -0600 schrieb Wamm K. D:
> > > +              (substitute* "pygobject/meson.build"
> > > +                (("get_option[(]'py-overrides-dir'[)]")
> > > +                 (string-append "'"
> > > +                                (assoc-ref outputs "out")
> > > +                                "/lib/python"
> > > +                                #$(version-major+minor (package-
> > > version python))
> > > +                                "/site-
> > > packages/gi/overrides'")))
> > I think python-build-system has a function to get this version in a
> > more reliable way.
>
> Would you possibly know any more details on it? Just looking through
> the module, I don't see any functions regarding version number, I'm
> afraid, and it's not intuitive to me how I might use it in this
> context if I'm using a different build system for the package.

You're looking for the (site-packages) function. As for how to use it,
you need to "mix in" the python build system as is done for instance in
python-gst.

Toggle quote (17 lines)
> > > +                (("'/usr/bin/pastebin'") (string-append "'"
> > > +                                                        (assoc-
> > > ref
> > > outputs "out")
> > > +                                                       
> > > "/bin/pastebin'"))
> > Oof, fine, but note that you can also write #$output
>
> Fair; I'd thought about it but the example I was working off of was
> using G-expressions and did it this way so I just went with it.
>
> Something I've wondered: is there a point to having the lambda
> arguments be "#:key outputs", if you can just use "#$output"? I've
> seen a few setup their lambda that way only to use "#$output" and not
> ever use "outputs".
>
> I may just be missing something regarding G-expressions, though.
The outputs key comes from a time in which #$output could not yet be
used in phases. There is currently no definitely preferred flavour.

Toggle quote (27 lines)
> > > +    (synopsis "Cross-desktop libraries and common resources for
> > > X-
> > > apps")
> > > +    (description
> > > +     "The components which are common to multiple GTK desktop
> > > environments
> > > +(Cinnamon, MATE and Xfce) and required to implement cross-DE
> > > solutions.")
> > The description should consist of full sentences.
> > Also, since X-Apps are quite specific to Linux Mint, you should
> > probably not take folks knowing what they are for granted.
>
> True but is there any easy way to specify what they're related to
> without making it much longer than just a synopsis?
>
> "Cross-desktop libraries and common resources" can apply to many
> things and is generic to the point of being unhelpful, I'd think.
>
> I could always do "developed by Linux Mint" instead of "for X-apps"
> which might be more familiar but, again, it borders to being
> unhelpfully unspecific, again (even if less so), to me; there are
> probably a lot of "Cross-desktop libraries and common resources"
> developed by Linux Mint. This particular library was developed for
> use with the X-apps they're developing, specifically.
>
> I'm just not sure what other description would work while still being
> a synopsis.
I think "Library for traditional GTK applications" would work fine,
looking at [1].

Toggle quote (1 lines)
> >
W
W
Wamm K. D wrote on 25 Dec 2022 01:54
[PATCH v2] gnu: Add libxapp.
(address . 60294@debbugs.gnu.org)
BY5PR07MB7029DD757F5C35AF6D52DF4899EF9@BY5PR07MB7029.namprd07.prod.outlook.com
* gnu/packages/cinnamon.scm (libxapp): New variable.
---
You were right about that copyright; /every/ file (which mentioned the
copyright) referenced regular LGPL other than the "copyright" file
under the "debian" directory, where it specified LGPL-3+.

gnu/packages/cinnamon.scm | 76 +++++++++++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)

Toggle diff (96 lines)
diff --git a/gnu/packages/cinnamon.scm b/gnu/packages/cinnamon.scm
index fe33e797e4..1b5cd44f65 100644
--- a/gnu/packages/cinnamon.scm
+++ b/gnu/packages/cinnamon.scm
@@ -26,6 +26,7 @@ (define-module (gnu packages cinnamon)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
+ #:use-module (gnu packages admin)
#:use-module (gnu packages autotools)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
@@ -37,6 +38,81 @@ (define-module (gnu packages cinnamon)
#:use-module (gnu packages python)
#:use-module (gnu packages xorg))
+(define-public libxapp
+ (package
+ (name "libxapp")
+ (version "2.4.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/linuxmint/xapp/")
+ (commit version)))
+ (sha256
+ (base32
+ "0cy9g0zqcbx9zscc9qavqmghfyfb8244cg299llv1ha8n6mpxl3s"))))
+ (build-system meson-build-system)
+ (arguments
+ (list
+ #:modules
+ `((guix build meson-build-system)
+ (guix build utils)
+ ((guix build python-build-system) #:prefix python:))
+ #:imported-modules
+ `(,@%meson-build-system-modules
+ (guix build python-build-system))
+ #:configure-flags
+ #~(list (string-append
+ "-Dpy-overrides-dir="
+ (python:site-packages %build-inputs %outputs) "/gi/overrides"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'set-gtk-module-path
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* "libxapp/meson.build"
+ (("gtk3_dep\\.get_pkgconfig_variable[(]'libdir'[)]")
+ (string-append "'" (assoc-ref outputs "out") "/lib'")))
+
+ (substitute* "scripts/pastebin"
+ (("'nc'") (string-append "'"
+ (search-input-file inputs "/bin/nc")
+ "'")))
+
+ (substitute* "scripts/upload-system-info"
+ (("'inxi'") (string-append "'"
+ (search-input-file inputs "/bin/inxi")
+ "'"))
+ (("'/usr/bin/pastebin'") (string-append "'"
+ (assoc-ref outputs "out")
+ "/bin/pastebin'"))
+ (("'xdg-open'") (string-append "'"
+ (search-input-file inputs "/bin/xdg-open")
+ "'"))))))))
+ (inputs
+ (list dbus
+ glib ; for gio
+ gtk+
+ inxi-minimal ; used by upload-system-info
+ libdbusmenu
+ libgnomekbd
+ netcat ; used by pastebin
+ xdg-utils ; used by upload-system-info
+ ))
+ (native-inputs
+ (list gettext-minimal
+ `(,glib "bin") ; for glib-mkenums
+ gobject-introspection
+ pkg-config
+ python
+ python-pygobject
+ vala))
+ (home-page "https://github.com/linuxmint/xapp")
+ (synopsis "Library for traditional GTK applications")
+ (description
+ "The libxapp package contains the components which are common to multiple
+GTK desktop environments (Cinnamon, MATE and Xfce) and required to implement
+cross-DE solutions.")
+ (license license:lgpl3+)))
+
(define-public cinnamon-desktop
(package
(name "cinnamon-desktop")
--
2.38.1
J
(name . 60294@debbugs.gnu.org)(address . 60294@debbugs.gnu.org)(name . liliana.prikler@gmail.com)(address . liliana.prikler@gmail.com)
BY5PR07MB702929413AFFC8845A52EA1C99C49@BY5PR07MB7029.namprd07.prod.outlook.com
Just wanted to double check if the changes I made fixed previous problems that were brought up with the first patch.
L
L
Liliana Marie Prikler wrote on 19 Jan 2023 20:42
19ad2da5620519192724341205806f1ef6b9d5a7.camel@gmail.com
Hi,

Am Donnerstag, dem 19.01.2023 um 16:06 +0000 schrieb Jaft:
Toggle quote (2 lines)
> Just wanted to double check if the changes I made fixed previous
> problems that were brought up with the first patch.
Sorry, this flew under the radar. Your v2 still had some minor errors,
but I have a local version that works and will be pushed with my next
batch on Sunday.

Cheers
J
BY5PR07MB7029915ECD4375BEC560417799C59@BY5PR07MB7029.namprd07.prod.outlook.com
Awesome; thanks so much, Liliana!
L
L
Liliana Marie Prikler wrote on 22 Jan 2023 10:08
ebab98ebab384a36cc5e8505654aa8fa9826c9c4.camel@gmail.com
Am Freitag, dem 20.01.2023 um 05:50 +0000 schrieb Jaft:
Toggle quote (1 lines)
> Awesome; thanks so much, Liliana!
Pushed now.

Cheers
Closed
?