# -rw-r--r-- 1.1 KiB View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 guix/scripts/style.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/style.scm b/guix/scripts/style.scm
index c75b86081e..e21e622fb7 100644
--- a/guix/scripts/style.scm
+++ b/guix/scripts/style.scm
@@ -217,7 +217,16 @@ value is INPUTS the corresponding source code is STR.  Return a string to
 replace STR."
   (define (label-matches? label name)
     ;; Return true if LABEL matches NAME, a package name.
-    (or (string=? label name)
+    ;;
+    ;; Sometimes a prefix is dropped from the label, e.g., "magit"
+    ;; instead of "emacs-magit".
+    (or (string-suffix? label name)
+        ;; Specific output, e.g., "glib:bin"
+        (string=? (first (string-split label #\:)) name)
+        ;; Catch `-minimal' packages, e.g., `gettext-minimal'
+        (string=? (string-append label "-minimal") name)
+        ;; Catch `-bootstrap' packages, e.g. `python-six-bootstrap'
+        (string=? (string-append label "-bootstrap") name)
         (and (string-prefix? "python-" label)
              (string-prefix? "python2-" name)
              (string=? (string-drop label (string-length "python-"))