summaryrefslogtreecommitdiff
path: root/guix/packages.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/packages.scm')
-rw-r--r--guix/packages.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index 76e01f3f12..b397a24678 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -229,11 +229,14 @@ corresponds to the arguments expected by `set-path-environment-variable'."
(lambda (package port)
(let ((loc (package-location package))
(format simple-format))
- (format port "#<package ~a-~a ~a:~a ~a>"
+ (format port "#<package ~a-~a ~a~a>"
(package-name package)
(package-version package)
- (location-file loc)
- (location-line loc)
+ (if loc
+ (format #f "~a:~a "
+ (location-file loc)
+ (location-line loc))
+ "")
(number->string (object-address
package)
16)))))