guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/29: website: packages: Ignore third-party packages.


From: Ludovic Courtès
Subject: 02/29: website: packages: Ignore third-party packages.
Date: Wed, 6 Dec 2017 09:24:21 -0500 (EST)

civodul pushed a commit to branch master
in repository guix-artwork.

commit 0ee4de8b5b2d60b0fea3300feb2e83129be76631
Author: Ludovic Courtès <address@hidden>
Date:   Sat Jul 29 16:53:39 2017 +0200

    website: packages: Ignore third-party packages.
    
    * website/apps/packages/data.scm (all-packages): Parameterize
    %PACKAGE-MODULE-PATH.
---
 website/apps/packages/data.scm | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/website/apps/packages/data.scm b/website/apps/packages/data.scm
index d34b0fb..424701a 100644
--- a/website/apps/packages/data.scm
+++ b/website/apps/packages/data.scm
@@ -39,14 +39,18 @@
 
    If GUIX_WEB_SITE_LOCAL=yes, return only 300 packages for
    testing the website."
-  (let ((packages (sort (fold-packages (lambda (package lst)
-                                        (cons (or (package-replacement package)
-                                                  package)
-                                              lst))
-                                      '())
-                       (lambda (p1 p2)
-                         (string<? (package-name p1)
-                                   (package-name p2))))))
+  ;; Note: Dismiss packages found in $GUIX_PACKAGE_PATH.
+  (let ((packages
+         (sort (parameterize ((%package-module-path (last-pair
+                                                     (%package-module-path))))
+                 (fold-packages (lambda (package lst)
+                                  (cons (or (package-replacement package)
+                                            package)
+                                        lst))
+                                '()))
+               (lambda (p1 p2)
+                 (string<? (package-name p1)
+                           (package-name p2))))))
     (cond ((null? packages) '())
          ((getenv "GUIX_WEB_SITE_LOCAL") (list-head packages 300))
          (else packages))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]