[bug#68228,v2] gnu: Add gnome-software.

Message ID 9f685785e2ce87f2086d4b7f19cad36fcb6a893f.1742149015.git.noelopez@free.fr
State New
Headers
Series [bug#68228,v2] gnu: Add gnome-software. |

Commit Message

Noé Lopez March 16, 2025, 6:18 p.m. UTC
  From: terramorpha <terramorpha@cock.li>

* gnu/packages/gnome.scm (gnome-software): New variable.

Change-Id: I5838a581d8612eed0697c801fff0e241256ce558
---
 gnu/packages/gnome.scm | 70 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)


base-commit: 8a565a8ff1c2150b778b5fdf8aa3a5f59a3fce9d
  

Comments

Liliana Marie Prikler March 16, 2025, 7:38 p.m. UTC | #1
Am Sonntag, dem 16.03.2025 um 19:18 +0100 schrieb Noé Lopez:
> From: terramorpha <terramorpha@cock.li>
> 
> * gnu/packages/gnome.scm (gnome-software): New variable.
> 
> Change-Id: I5838a581d8612eed0697c801fff0e241256ce558
> ---
>  gnu/packages/gnome.scm | 70
> ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 70 insertions(+)
> 
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 7705ba0513..fbecc886c8 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -79,6 +79,8 @@
>  ;;; Copyright © 2023 Zhu Zihao <all_but_last@163.com>
>  ;;; Copyright © 2024 Dariqq <dariqq@posteo.net>
>  ;;; Copyright © 2024 James Smith <jsubuntuxp@disroot.org>
> +;;; Copyright © 2024 Justin Veilleux <terramorpha@cock.li>
> +;;; Copyright © 2025 Noé Lopez <noelopez@free.fr>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -135,6 +137,7 @@ (define-module (gnu packages gnome)
>    #:use-module (gnu packages flex)
>    #:use-module (gnu packages fonts)
>    #:use-module (gnu packages file-systems)
> +  #:use-module (gnu packages firmware)
>    #:use-module (gnu packages fontutils)
>    #:use-module (gnu packages freedesktop)
>    #:use-module (gnu packages game-development)
> @@ -14594,3 +14597,70 @@ (define-public lock
>      (description "This package provides a graphical frontend for
>  GNU Privacy Guard built with libadwaita.")
>      (license license:expat)))
> +
> +(define-public gnome-software
> +  (package
> +    (name "gnome-software")
> +    (version "46.5")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri
> +        (string-append "mirror://gnome/sources/"
> +                       name "/"
> +                       (version-major version) "/"
> +                       name "-" version ".tar.xz"))
> +       (sha256 (base32
> "0b5y9z64582aarw3v92wjm63yib2q85ylny1k7k4d2y48jivirb9"))))
> +    (native-inputs
> +     (list
> +      pkg-config
> +      (list glib "bin")
> +      gettext-minimal
> +      gtk-doc))
> +    (inputs
> +     (list
> +      appstream
> +      gdk-pixbuf
> +      libxmlb
> +      gtk
> +      json-glib
> +      libadwaita
> +      libglib-testing
> +      valgrind
> +      polkit
> +      packagekit
> +      flatpak
> +      libostree
> +      libsoup-minimal-2
> +      malcontent
> +      libgudev
> +      sysprof
> +      fwupd))
Inputs should be after build-system+arguments.
Please sort them.  You can also likely save two lines there, depending
on how far you want to indent.
> +    (build-system meson-build-system)
> +    (arguments
> +     (list
> +      #:glib-or-gtk? #t
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (add-after 'unpack 'patch-iso-codes
> +            (lambda* (#:key native-inputs inputs #:allow-other-keys)
> +              (with-directory-excursion
> +                  "src"
> +                (substitute* "./gs-language.c"
> +                  (("DATADIR")
> +                   (format #f "\"~a/share\"" #$iso-codes)))
> +                (invoke "cat" "gs-language.c"))))
> +          (add-after 'unpack 'disable-gtk-update-icon-cache
> +            (lambda _
> +              (setenv "DESTDIR" "/"))))
#:phases should typically be put last
> +      #:configure-flags
> +      ''("-Dsoup2=true"
> +         "-Dman=false"                  ;tries to access the
> internet
> +         "-Dhardcoded_proprietary_webapps=false")
Use #~(list …)
> +      #:tests? #f
Don't leave this undocumented.
> +      #:validate-runpath? #f))
I doubt that this one should even be used, but again: explain yourself.
> +    (synopsis "Graphical software manager for gnome")
> +    (description "Software allows you to find and install new apps
> and system
> +extensions and remove existing installed apps.")
> +    (license license:gpl2)
Is this really GPL2 only?  If not, use gpl2+
> +    (home-page "https://apps.gnome.org/en/Software/")))

Most importantly: does it work?  Can you do something with it?

Cheers
  
Noé Lopez March 16, 2025, 10:09 p.m. UTC | #2
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Am Sonntag, dem 16.03.2025 um 19:18 +0100 schrieb Noé Lopez:
>> From: terramorpha <terramorpha@cock.li>
>> 
>> * gnu/packages/gnome.scm (gnome-software): New variable.
>> 
>> Change-Id: I5838a581d8612eed0697c801fff0e241256ce558
>> ---
>>  gnu/packages/gnome.scm | 70
>> ++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 70 insertions(+)
>> 
>> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
>> index 7705ba0513..fbecc886c8 100644
>> --- a/gnu/packages/gnome.scm
>> +++ b/gnu/packages/gnome.scm
>> @@ -79,6 +79,8 @@
>>  ;;; Copyright © 2023 Zhu Zihao <all_but_last@163.com>
>>  ;;; Copyright © 2024 Dariqq <dariqq@posteo.net>
>>  ;;; Copyright © 2024 James Smith <jsubuntuxp@disroot.org>
>> +;;; Copyright © 2024 Justin Veilleux <terramorpha@cock.li>
>> +;;; Copyright © 2025 Noé Lopez <noelopez@free.fr>
>>  ;;;
>>  ;;; This file is part of GNU Guix.
>>  ;;;
>> @@ -135,6 +137,7 @@ (define-module (gnu packages gnome)
>>    #:use-module (gnu packages flex)
>>    #:use-module (gnu packages fonts)
>>    #:use-module (gnu packages file-systems)
>> +  #:use-module (gnu packages firmware)
>>    #:use-module (gnu packages fontutils)
>>    #:use-module (gnu packages freedesktop)
>>    #:use-module (gnu packages game-development)
>> @@ -14594,3 +14597,70 @@ (define-public lock
>>      (description "This package provides a graphical frontend for
>>  GNU Privacy Guard built with libadwaita.")
>>      (license license:expat)))
>> +
>> +(define-public gnome-software
>> +  (package
>> +    (name "gnome-software")
>> +    (version "46.5")
>> +    (source
>> +     (origin
>> +       (method url-fetch)
>> +       (uri
>> +        (string-append "mirror://gnome/sources/"
>> +                       name "/"
>> +                       (version-major version) "/"
>> +                       name "-" version ".tar.xz"))
>> +       (sha256 (base32
>> "0b5y9z64582aarw3v92wjm63yib2q85ylny1k7k4d2y48jivirb9"))))
>> +    (native-inputs
>> +     (list
>> +      pkg-config
>> +      (list glib "bin")
>> +      gettext-minimal
>> +      gtk-doc))
>> +    (inputs
>> +     (list
>> +      appstream
>> +      gdk-pixbuf
>> +      libxmlb
>> +      gtk
>> +      json-glib
>> +      libadwaita
>> +      libglib-testing
>> +      valgrind
>> +      polkit
>> +      packagekit
>> +      flatpak
>> +      libostree
>> +      libsoup-minimal-2
>> +      malcontent
>> +      libgudev
>> +      sysprof
>> +      fwupd))
> Inputs should be after build-system+arguments.
> Please sort them.  You can also likely save two lines there, depending
> on how far you want to indent.
>> +    (build-system meson-build-system)
>> +    (arguments
>> +     (list
>> +      #:glib-or-gtk? #t
>> +      #:phases
>> +      #~(modify-phases %standard-phases
>> +          (add-after 'unpack 'patch-iso-codes
>> +            (lambda* (#:key native-inputs inputs #:allow-other-keys)
>> +              (with-directory-excursion
>> +                  "src"
>> +                (substitute* "./gs-language.c"
>> +                  (("DATADIR")
>> +                   (format #f "\"~a/share\"" #$iso-codes)))
>> +                (invoke "cat" "gs-language.c"))))
>> +          (add-after 'unpack 'disable-gtk-update-icon-cache
>> +            (lambda _
>> +              (setenv "DESTDIR" "/"))))
> #:phases should typically be put last
>> +      #:configure-flags
>> +      ''("-Dsoup2=true"
>> +         "-Dman=false"                  ;tries to access the
>> internet
>> +         "-Dhardcoded_proprietary_webapps=false")
> Use #~(list …)
>> +      #:tests? #f
> Don't leave this undocumented.
>> +      #:validate-runpath? #f))
> I doubt that this one should even be used, but again: explain yourself.
>> +    (synopsis "Graphical software manager for gnome")
>> +    (description "Software allows you to find and install new apps
>> and system
>> +extensions and remove existing installed apps.")
>> +    (license license:gpl2)
> Is this really GPL2 only?  If not, use gpl2+
>> +    (home-page "https://apps.gnome.org/en/Software/")))
>

Thanks for the fast review, I’m sending an updated patch with everything
fixed.

> Most importantly: does it work?  Can you do something with it?

It does work!  If you want some apps to appear you need two things: an
active packagekit backend and the corresponding AppStream catalog.  For
example installing flatpak and flathub should make all of flathub
available.  There are also some progressive web apps bundled, I haven’t
tried them.

As for Guix packages, I’m currently working on the integration and
looking for a mentor to review some bits:
https://lists.gnu.org/archive/html/guix-devel/2025-03/msg00003.html

Have a nice day,
Noé
  

Patch

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 7705ba0513..fbecc886c8 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -79,6 +79,8 @@ 
 ;;; Copyright © 2023 Zhu Zihao <all_but_last@163.com>
 ;;; Copyright © 2024 Dariqq <dariqq@posteo.net>
 ;;; Copyright © 2024 James Smith <jsubuntuxp@disroot.org>
+;;; Copyright © 2024 Justin Veilleux <terramorpha@cock.li>
+;;; Copyright © 2025 Noé Lopez <noelopez@free.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -135,6 +137,7 @@  (define-module (gnu packages gnome)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fonts)
   #:use-module (gnu packages file-systems)
+  #:use-module (gnu packages firmware)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages game-development)
@@ -14594,3 +14597,70 @@  (define-public lock
     (description "This package provides a graphical frontend for
 GNU Privacy Guard built with libadwaita.")
     (license license:expat)))
+
+(define-public gnome-software
+  (package
+    (name "gnome-software")
+    (version "46.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://gnome/sources/"
+                       name "/"
+                       (version-major version) "/"
+                       name "-" version ".tar.xz"))
+       (sha256 (base32 "0b5y9z64582aarw3v92wjm63yib2q85ylny1k7k4d2y48jivirb9"))))
+    (native-inputs
+     (list
+      pkg-config
+      (list glib "bin")
+      gettext-minimal
+      gtk-doc))
+    (inputs
+     (list
+      appstream
+      gdk-pixbuf
+      libxmlb
+      gtk
+      json-glib
+      libadwaita
+      libglib-testing
+      valgrind
+      polkit
+      packagekit
+      flatpak
+      libostree
+      libsoup-minimal-2
+      malcontent
+      libgudev
+      sysprof
+      fwupd))
+    (build-system meson-build-system)
+    (arguments
+     (list
+      #:glib-or-gtk? #t
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-iso-codes
+            (lambda* (#:key native-inputs inputs #:allow-other-keys)
+              (with-directory-excursion
+                  "src"
+                (substitute* "./gs-language.c"
+                  (("DATADIR")
+                   (format #f "\"~a/share\"" #$iso-codes)))
+                (invoke "cat" "gs-language.c"))))
+          (add-after 'unpack 'disable-gtk-update-icon-cache
+            (lambda _
+              (setenv "DESTDIR" "/"))))
+      #:configure-flags
+      ''("-Dsoup2=true"
+         "-Dman=false"                  ;tries to access the internet
+         "-Dhardcoded_proprietary_webapps=false")
+      #:tests? #f
+      #:validate-runpath? #f))
+    (synopsis "Graphical software manager for gnome")
+    (description "Software allows you to find and install new apps and system
+extensions and remove existing installed apps.")
+    (license license:gpl2)
+    (home-page "https://apps.gnome.org/en/Software/")))