guix-commits
[Top][All Lists]
Advanced

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

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


From: Ludovic Courtès
Subject: 02/12: website: packages: Ignore third-party packages.
Date: Sun, 30 Jul 2017 16:23:16 -0400 (EDT)

civodul pushed a commit to branch wip-website-update
in repository guix-artwork.

commit 562f47d407656754df7d1fd7a312f3c5f8ead128
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]