Subject: bug#59385: closed (Re: bug#59385: [PATCH] website: Link to the new packages browser)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 25 Nov 2022 17:10:02 +0000

Your bug report

#59385: [PATCH] website: Link to the new packages browser

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
59385: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59385
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#59385: [PATCH] website: Link to the new packages browser
From: Ludovic Courtès <[email-masked]>
To: Luis Felipe <[email-masked]>
Cc: [email-masked]
Date: Fri, 25 Nov 2022 18:09:33 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hola Luis,

Luis Felipe <[email-masked]> skribis:

> From 29723b3c711db2316e1fb66d252de769494b4a98 Mon Sep 17 00:00:00 2001
> From: Luis Felipe <[email-masked]>
> Date: Mon, 21 Nov 2022 11:06:03 -0500
> Subject: [PATCH] website: Remove packages app.
>
> There is a new package browser at https://packages.guix.gnu.org/. It
> is not necessary to generate a static package catalog anymore.
>
> * website/apps/packages: Remove it.
> * website/tests/apps/packages: Likewise.
> * website/haunt.scm (site): Remove packages builder.
> * website/tests/all.scm: Don't import packages tests.

I realized we still need to build /sources.json and /packages.json, so I
kept these and removed all the rest (commit
412ac3958bf288c56fded35d0a632c530e57ef8f).

Maybe we’ll eventually build them on Cuirass or something.

Anyway ‘haunt build’ is soooo fast now!  :-)

Thanks,
Ludo’.

Subject: [PATCH] website: Link to the new packages browser
From: Luis Felipe <[email-masked]>
To: Luis Felipe via Guix-patches <[email-masked]>
Date: Sat, 19 Nov 2022 13:47:40 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

This is a patch for the guix-artwork repository.

---
Luis Felipe López Acevedo
https://luis-felipe.gitlab.io/

From ad0effaab60acdb7bd0e533bd544b49a4bee8a2b Mon Sep 17 00:00:00 2001
From: Luis Felipe <[email-masked]>
Date: Sat, 19 Nov 2022 08:21:04 -0500
Subject: [PATCH] website: Link to the new packages browser.

Update all package-related links to point to the newly deployed browser
at https://packages.guix.gnu.org/.

* website/apps/base/utils.scm (packages-url): New procedure.
* website/apps/base/data.scm (contact-media): Use packages-url.
* website/apps/base/templates/components.scm (navbar): Likewise.
* website/apps/base/templates/contribute.scm (contribute-t): Likewise.
* website/apps/base/templates/donate.scm (donate-t): Likewise.
* website/apps/base/templates/home.scm (home-t): Likewise.
---
 website/apps/base/data.scm                 |  2 +-
 website/apps/base/templates/components.scm |  5 ++++-
 website/apps/base/templates/contribute.scm |  6 +++---
 website/apps/base/templates/donate.scm     |  2 +-
 website/apps/base/templates/home.scm       |  2 +-
 website/apps/base/utils.scm                | 14 +++++++++++++-
 6 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/website/apps/base/data.scm b/website/apps/base/data.scm
index 4f1bb5f..ad44a10 100644
--- a/website/apps/base/data.scm
+++ b/website/apps/base/data.scm
@@ -190,7 +190,7 @@ het Nederlands.")
        "This is a private mailing list that anyone can post to to "
        ,(G_ `(a (@ (href ,(guix-url "security/"))) "report security issues"))
        " in Guix itself or in "
-       "the " ,(G_ `(a (@ (href ,(guix-url "packages/"))) "packages"))
+       "the " ,(G_ `(a (@ (href ,(packages-url))) "packages"))
        " it provides.  Posting here allows Guix developers to address
        the problem before it is widely publicized."))
     #:url "https://lists.gnu.org/mailman/listinfo/guix-security"
diff --git a/website/apps/base/templates/components.scm b/website/apps/base/templates/components.scm
index e1e0b23..5f4af9c 100644
--- a/website/apps/base/templates/components.scm
+++ b/website/apps/base/templates/components.scm
@@ -463,7 +463,10 @@ manual.
                         #:url (guix-url "contact/")))))

-      ,(C_ "website menu" (menu-item #:label "Packages" #:active-item active-item #:url (guix-url "packages/")))
+      ,(C_ "website menu"
+           (menu-item #:label "Packages"
+                      #:active-item active-item
+                      #:url (packages-url)))
       ,(C_ "website menu" (menu-item #:label "Blog" #:active-item active-item #:url (guix-url "blog/")))
 
       ,(menu-dropdown #:label (C_ "website menu" "Media") #:active-item active-item
diff --git a/website/apps/base/templates/contribute.scm b/website/apps/base/templates/contribute.scm
index 9b7987c..42ffcb9 100644
--- a/website/apps/base/templates/contribute.scm
+++ b/website/apps/base/templates/contribute.scm
@@ -125,7 +125,7 @@ Translation|I18N|L10N|Artwork") #\|)
         ,(G_
           `(p
             "Helping improve the documentation of the "
-            ,(G_ `(a (@ (href ,(guix-url "packages/"))) "packaged software"))
+            ,(G_ `(a (@ (href ,(packages-url))) "packaged software"))
             " is another way to contribute. "))
 	(p
 	 ,(link-more
@@ -157,7 +157,7 @@ Translation|I18N|L10N|Artwork") #\|)
         ,(G_
           `(p
             "Check out the "
-            ,(G_ `(a (@ (href ,(guix-url "packages/")))
+            ,(G_ `(a (@ (href ,(packages-url)))
                      "package database"))
             " for a list of available packages, and the "
             ,(G_ `(a (@ (href "//issues.guix.gnu.org/search?query=tag%3Apatch+is%3Aopen"))
@@ -290,7 +290,7 @@ Translation|I18N|L10N|Artwork") #\|)
             " to have a look at the styleguides and the work of other translators"))
         ,(G_
           `(p
-            ,(G_ `(a (@ (href ,(guix-url "packages"))) "Software packages"))
+            ,(G_ `(a (@ (href ,(packages-url))) "Software packages"))
             " provided by the system may have their own translation
             tools.  Visit their websites and help translate. "))
 	(p
diff --git a/website/apps/base/templates/donate.scm b/website/apps/base/templates/donate.scm
index 595e1d3..5257a57 100644
--- a/website/apps/base/templates/donate.scm
+++ b/website/apps/base/templates/donate.scm
@@ -41,7 +41,7 @@ system|GNU Hurd|GNU Guix package manager|Donations") #\|)
                 "build farm"))
           " of Guix runs on donated hardware and"
           " hosting. As the distribution grows (see the "
-          ,(G_ `(a (@ (href ,(guix-url "packages/"))) "package list"))
+          ,(G_ `(a (@ (href ,(packages-url))) "package list"))
           "), so do the computing and storage needs."))
 
       ,(G_
diff --git a/website/apps/base/templates/home.scm b/website/apps/base/templates/home.scm
index 47adeb7..7b72da8 100644
--- a/website/apps/base/templates/home.scm
+++ b/website/apps/base/templates/home.scm
@@ -136,7 +136,7 @@ goods readily available for installing with the "
 
        ,(button-big
          #:label (C_ "button" "ALL PACKAGES")
-	 #:url (guix-url "packages/")
+	 #:url (packages-url)
 	 #:light #true))
 
       ,(horizontal-separator #:light #true)
diff --git a/website/apps/base/utils.scm b/website/apps/base/utils.scm
index d172433..c69d034 100644
--- a/website/apps/base/utils.scm
+++ b/website/apps/base/utils.scm
@@ -41,7 +41,8 @@
             manual-devel-url
             manual-url-with-language
 	    number*
-	    paginate))
+	    paginate
+            packages-url))

 ;;;
@@ -172,6 +173,17 @@ manual.
   ;; The _ argument is a placeholder for an arg added by G_, cf. i18n-howto.txt.
   (manual-url subpath #:language language))
 
+(define* (packages-url #:optional (path ""))
+  "Append PATH to https://packages.guix.gnu.org/ URL.
+
+   PATH (string)
+     An optional relative URL path to a resource. For example:
+     'packages/guile/'.
+
+   RETURN VALUE (string)
+     A URL. For example: https://packages.guix.gnu.org/packages/guile/."
+  (string-append "https://packages.guix.gnu.org/" path))
+

 ;;;

base-commit: eaa7e78164003f198d598e20fff871c428d95ded
-- 
2.38.0