GNU bug report logs - #75375
[PATCH 0/2] Add manifests for gnome-team

Previous Next

Package: guix-patches;

Reported by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Date: Sun, 5 Jan 2025 07:52:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 75375 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: 75375 <at> debbugs.gnu.org, vivien <at> planete-kraus.eu
Subject: Re: [bug#75375] [PATCH v1 1/2] teams: gnome: Add gnome-manifest.
Date: Sun, 19 Jan 2025 11:20:07 +0900
Hi Liliana,

Liliana Marie Prikler <liliana.prikler <at> gmail.com> writes:

> * etc/teams/gnome/gnome-manifest.scm: New file.

[...]

> +(define (propagated-inputs package)
> +  (map
> +   (match-lambda
> +     ((_ (? package? pkg)) pkg)
> +     ((_ (? package? pkg) output) (list pkg output)))
> +   (package-propagated-inputs package)))
> +
> +(packages->manifest
> + (append-map propagated-inputs
> +             (list gnome-meta-core-services
> +                   gnome-meta-core-shell
> +                   gnome-meta-core-utilities
> +                   gnome-essential-extras)))

Good idea!  I have an unfinished branch locally where I was devising the
same; it looked like this:

--8<---------------cut here---------------start------------->8---
+(use-modules (guix git-download)
+             (guix packages)
+             (guix profiles)
+             (guix utils)
+             (gnu packages))
+
+;;; Commentary:
+;;;
+;;; This manifest can be used to update the GNOME packages collection, via
+;;; e.g.:
+;;;
+;;; ./pre-inst-env guix refresh -u -m etc/teams/gnome/gnome-manifest.scm \
+;;;   --target-version=48
+;;;
+;;; Code:
+
+(define (gnome-package? p)
+  "Predicate to check if P is a GNOME package."
+  (let ((uri (and=> (package-source p)
+                    (lambda (x)
+                      (and (origin? x)
+                           (origin-uri x)))))
+        (loc (package-location p)))
+    (or (and uri
+             (cond
+              ((string? uri)
+               (string-prefix? "mirror://gnome/" uri))
+              ((git-reference? uri)
+               (string-contains "gitlab.gnome.org"
+                                (git-reference-url uri)))
+              (else #f)))
+        (and loc
+             (string-contains "gnu/packages/gnome"
+                              (location-file loc))))))
+
+(define* (gnome-packages-manifest)
+  "Return a manifest of all GNOME packages."
+  (manifest
+   (map package->manifest-entry
+        (fold-packages
+         (lambda (package lst)
+           (if (gnome-package? package)
+               (cons package lst)
+               lst))
+         '()))))
--8<---------------cut here---------------end--------------->8---

The comment with --target-version=48 (partial version) depends on a
complete but unreleased feature (I'll publish it soon), that enables to
do so.

Would that be a more comprehensive of GNOME packages?  I'm also not sure
of the merit of separating extensions from other GNOME packages?

-- 
Thanks,
Maxim




This bug report was last modified 90 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.