summaryrefslogtreecommitdiff
path: root/guix/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-01-28 00:11:33 +0100
committerLudovic Courtès <ludo@gnu.org>2017-01-28 00:38:20 +0100
commit3b0fcc672d48ed67a807b20bde5d2f963c285074 (patch)
tree22710221294efac261ebaf5895c21c437195059c /guix/packages.scm
parent21f4a7c116ed884314f29a8dc69ed18092b35477 (diff)
packages: Add 'package-upstream-name' and use it.
* guix/packages.scm (package-upstream-name): New procedure. * guix/gnu-maintenance.scm (gnu-package?, ftp-server/directory) (latest-release*, latest-gnome-release) (latest-kde-release): Use it instead of the inline expression.
Diffstat (limited to 'guix/packages.scm')
-rw-r--r--guix/packages.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index beb958f156..defde2478a 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
@@ -62,6 +62,7 @@
package
package?
package-name
+ package-upstream-name
package-version
package-full-name
package-source
@@ -296,6 +297,12 @@ name of its URI."
package)
16)))))
+(define (package-upstream-name package)
+ "Return the upstream name of PACKAGE, which could be different from the name
+it has in Guix."
+ (or (assq-ref (package-properties package) 'upstream-name)
+ (package-name package)))
+
(define (hidden-package p)
"Return a \"hidden\" version of P--i.e., one that 'fold-packages' and thus,
user interfaces, ignores."