From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 09 17:43:32 2022 Received: (at 57704) by debbugs.gnu.org; 9 Sep 2022 21:43:32 +0000 Received: from localhost ([127.0.0.1]:35853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWlme-0005z8-98 for submit@debbugs.gnu.org; Fri, 09 Sep 2022 17:43:32 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:42600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWlmZ-0005yr-Pi for 57704@debbugs.gnu.org; Fri, 09 Sep 2022 17:43:31 -0400 Received: by mail-ed1-f66.google.com with SMTP id q21so4453091edc.9 for <57704@debbugs.gnu.org>; Fri, 09 Sep 2022 14:43:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:content-transfer-encoding:cc:to:subject :date:from:from:to:cc:subject:date; bh=2g0B9wpBwCQIWmq+mHMAxM69ABYApHTbquSBC2cqzZ0=; b=UVCNTSdb9wl6TSb89BXyJBs0u0EFsiJQAADv4E/lY7EwVFgHNb7qPXhelezbzbI1yB ZPXqvVKdFhlz+iukZliiGtymEwfwiQy/btKojl7msRxWzzG984gh3FP9I06gdN+u0Owz 8dThTqYBh9xyXz7pjjibei7eU5jyoP8miuWpS3a7s0T6d9jkEtuzNfGzquHUble+dk1J KnHZa0rHj1zYYoEFdftaffSJLKQ7Uvkre/8zH5MS6KGCE0kMlbW9KtnBQgKNOiVTB9th UDYujwcfBUqGx0S5DUI0AdpW9ACTtdFvhji8RKB3KhLukMhgYLFwsTbB5EszWl1fDRjd o7SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:content-transfer-encoding:cc:to:subject :date:from:x-gm-message-state:from:to:cc:subject:date; bh=2g0B9wpBwCQIWmq+mHMAxM69ABYApHTbquSBC2cqzZ0=; b=tWAwJAQ7a7Mbp0is0HhfRydKLL8vD1HivyaIvQVzbwt6AajwEckBfIEk2E+CIcCkCy 9xy0h8hAwVKYuGjN2z3m89alFpIhJ7RViss9Il0aO08s4SDmXDlpmNMIL2weYab0e5rN P+vIrFQLgTtdiakmbokhrmBbuH+8cdYrVEuiQdpI004zuZp0vDcbNXXAS64LlcEXn2bT 51xpn2z09hfDEKD/IGiZB4HUwPqFJIt3ssUx/NxKxOFq3dKARok9DLj/E5+T94lHLXtr Dfwahjv0rx6UYKg01Wmg+pa0oYiSIQJ/EZ/TZKeUK2NLvZZX0PdUb+H0bTkNrEGbnXDD UmBQ== X-Gm-Message-State: ACgBeo1D1gJtcg7k8hrIZ3PEC9v7j2WP4Dkrjw9emC7MYaxecnzmwJIB dBWFpXT7AjwAvM6tLr8qROo4TMq61oQ= X-Google-Smtp-Source: AA6agR564hMwwDJhsqKNc1bpq/XkDqWkrDKpG+f9GqoyFF32Ah5u+gTyheUd1TD6d4wYQf652W14dQ== X-Received: by 2002:a05:6402:2b8d:b0:43a:5410:a9fc with SMTP id fj13-20020a0564022b8d00b0043a5410a9fcmr13305955edb.99.1662759801653; Fri, 09 Sep 2022 14:43:21 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id g1-20020a17090604c100b0073da4b623e8sm781292eja.152.2022.09.09.14.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Sep 2022 14:43:21 -0700 (PDT) From: Liliana Marie Prikler Date: Fri, 9 Sep 2022 17:56:20 +0200 Subject: [PATCH v2] guix: packages: Remove #f from inputs when sanitizing. to: 57704@debbugs.gnu.org Content-Transfer-Encoding: 7bit Message-ID: MIME-Version: 1.0 X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This makes it so that new-style inputs can be optional using regular Guile patterns, e.g. (and (target-x86-64?) rust). * guix/packages.scm (sanitize-inputs): Filter inputs by identity before adding labels. --- As noted by Maxime, this doesn't seem to be cause any rebuilds, so retargeting master. Also added missing doc [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.1 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (liliana.prikler[at]gmail.com) -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.66 listed in wl.mailspike.net] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 57704 Cc: Maxime Devos X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) This makes it so that new-style inputs can be optional using regular Guile patterns, e.g. (and (target-x86-64?) rust). * guix/packages.scm (sanitize-inputs): Filter inputs by identity before adding labels. --- As noted by Maxime, this doesn't seem to be cause any rebuilds, so retargeting master. Also added missing documentation. guix/packages.scm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/guix/packages.scm b/guix/packages.scm index 94e464cd01..7569380610 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -428,13 +428,14 @@ (define %cuirass-supported-systems (fold delete %supported-systems '("mips64el-linux" "powerpc-linux" "riscv64-linux"))) (define-inlinable (sanitize-inputs inputs) - "Sanitize INPUTS by turning it into a list of name/package tuples if it's -not already the case." - (cond ((null? inputs) inputs) - ((and (pair? (car inputs)) - (string? (caar inputs))) - inputs) - (else (map add-input-label inputs)))) + "Sanitize INPUTS by removing falsy elements and turning it into a list of +name/package tuples if it's not already the case." + (let ((inputs (filter identity inputs))) + (cond ((null? inputs) inputs) + ((and (pair? (car inputs)) + (string? (caar inputs))) + inputs) + (else (map add-input-label inputs))))) (define-syntax current-location-vector (lambda (s) -- 2.37.2