From: David Craven <david@craven.ch>
To: guix-devel@gnu.org
Cc: David Craven <david@craven.ch>
Subject: [PATCH 1/4] lint: Add packages with suffix ':bin' to 'inputs-should-be-native'.
Date: Tue, 19 Jul 2016 18:49:13 +0200 [thread overview]
Message-ID: <20160719164916.6597-2-david@craven.ch> (raw)
In-Reply-To: <20160719164916.6597-1-david@craven.ch>
* guix/scripts/lint.scm (check-inputs-should-be-native): Check that packages
with suffix ':bin' and 'intltool', 'itstool' are in native-inputs.
---
guix/scripts/lint.scm | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index d5e9197..d64a066 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -206,11 +206,19 @@ by two spaces; possible infraction~p at ~{~a~^, ~}")
(let ((inputs (package-inputs package)))
(match inputs
(((labels packages . _) ...)
- (when (member "pkg-config"
- (map package-name (filter package? packages)))
- (emit-warning package
- (_ "pkg-config should probably be a native input")
- 'inputs))))))
+ (let ((package-names (map package-name (filter package? packages)))
+ (native-package-names '("pkg-config" "intltool" "itstool"))
+ (warn (lambda (package-name)
+ (emit-warning package
+ (_ (string-append
+ package-name " should probably be a native input")) 'inputs))))
+ (begin
+ (for-each (lambda (package-name)
+ (when (member package-name package-names) (warn package-name)))
+ native-package-names)
+ (for-each (lambda* (package-name)
+ (when (string-suffix? ":bin" package-name) (warn package-name)))
+ labels)))))))
(define (package-name-regexp package)
"Return a regexp that matches PACKAGE's name as a word at the beginning of a
--
2.9.0
next prev parent reply other threads:[~2016-07-19 16:50 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 16:49 [PATCH 0/4] Dipping my toes into guix source David Craven
2016-07-19 16:49 ` David Craven [this message]
2016-07-20 10:37 ` [PATCH 1/4] lint: Add packages with suffix ':bin' to 'inputs-should-be-native' Ludovic Courtès
2016-07-20 10:50 ` David Craven
2016-07-20 11:19 ` Efraim Flashner
2016-07-21 12:24 ` Ludovic Courtès
2016-07-21 13:22 ` Vincent Legoll
2016-07-21 16:06 ` Ludovic Courtès
2016-07-21 19:27 ` Tobias Geerinckx-Rice
2016-07-22 13:32 ` Ludovic Courtès
2016-07-22 14:07 ` Vincent Legoll
2016-07-19 16:49 ` [PATCH 2/4] gnu: Rename 'glib' label to 'glib:bin' where appropriate David Craven
2016-07-22 12:57 ` Ludovic Courtès
2016-07-22 13:03 ` David Craven
2016-07-22 17:55 ` David Craven
2016-07-19 16:49 ` [PATCH 3/4] lint: Add 'inputs-should-be-sorted' check David Craven
2016-07-21 13:17 ` Eric Bavier
2016-07-21 16:00 ` Ludovic Courtès
2016-07-19 16:49 ` [PATCH 4/4] environment: Add '--debug' flag David Craven
2016-07-19 17:14 ` Thompson, David
2016-07-19 18:00 ` Tobias Geerinckx-Rice
2016-07-19 18:10 ` David Craven
2016-07-19 19:02 ` David Craven
2016-07-19 19:06 ` Thompson, David
2016-07-19 19:15 ` David Craven
2016-07-20 4:17 ` Leo Famulari
2016-07-20 10:35 ` Ludovic Courtès
2016-07-20 10:56 ` David Craven
2016-07-19 20:11 ` Danny Milosavljevic
2016-07-20 7:18 ` Alex Kost
2016-07-20 7:35 ` Vincent Legoll
2016-07-20 9:15 ` Pjotr Prins
2016-07-22 19:54 ` Customising linux-libre (was: [PATCH 4/4] environment: Add '--debug' flag.) Tobias Geerinckx-Rice
2016-07-22 19:58 ` Vincent Legoll
2016-07-22 20:00 ` David Craven
2016-07-22 20:03 ` Vincent Legoll
2016-07-22 20:15 ` Customising linux-libre Tobias Geerinckx-Rice
2016-07-22 20:50 ` David Craven
2016-07-22 20:11 ` Tobias Geerinckx-Rice
2016-07-23 10:38 ` Ludovic Courtès
2016-07-21 12:22 ` [PATCH 4/4] environment: Add '--debug' flag Ludovic Courtès
2016-07-21 12:30 ` David Craven
2016-07-21 16:03 ` Ludovic Courtès
2016-07-21 16:12 ` David Craven
2016-07-21 16:38 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160719164916.6597-2-david@craven.ch \
--to=david@craven.ch \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).