aboutsummaryrefslogtreecommitdiff
path: root/guix/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-07-28 18:50:43 +0200
committerLudovic Courtès <ludo@gnu.org>2016-07-28 18:50:43 +0200
commit6980511b7391e65a307689f90e4ef5c1979e4541 (patch)
tree72f54adfe4e0187845882fb88cfa80c275424d9a /guix/packages.scm
parentcb55f9c652105d9ed4fc46cb902f0935fe7e35f8 (diff)
downloadgnu-guix-6980511b7391e65a307689f90e4ef5c1979e4541.tar
gnu-guix-6980511b7391e65a307689f90e4ef5c1979e4541.tar.gz
packages: Add 'hidden-package'.
* guix/packages.scm (hidden-package, hidden-package?): New procedures. * gnu/packages.scm (fold-packages): Filter out 'hidden-package?'. * tests/packages.scm ("hidden-package"): New test.
Diffstat (limited to 'guix/packages.scm')
-rw-r--r--guix/packages.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index bfb4c557ab..3646b9ba13 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -81,6 +81,8 @@
package-maintainers
package-properties
package-location
+ hidden-package
+ hidden-package?
package-field-location
package-direct-sources
@@ -290,6 +292,19 @@ name of its URI."
package)
16)))))
+(define (hidden-package p)
+ "Return a \"hidden\" version of P--i.e., one that 'fold-packages' and thus,
+user interfaces, ignores."
+ (package
+ (inherit p)
+ (properties `((hidden? . #t)
+ ,@(package-properties p)))))
+
+(define (hidden-package? p)
+ "Return true if P is \"hidden\"--i.e., must not be visible to user
+interfaces."
+ (assoc-ref (package-properties p) 'hidden?))
+
(define (package-field-location package field)
"Return the source code location of the definition of FIELD for PACKAGE, or
#f if it could not be determined."