From patchwork Sat Nov 20 04:33:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 34692 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 70CBD27BBE1; Sat, 20 Nov 2021 04:36:34 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CF31627BBE3 for ; Sat, 20 Nov 2021 04:36:33 +0000 (GMT) Received: from localhost ([::1]:38758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1moI77-0005MS-1H for patchwork@mira.cbaines.net; Fri, 19 Nov 2021 23:36:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moI5m-0002NW-R1 for guix-patches@gnu.org; Fri, 19 Nov 2021 23:35:12 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:57945) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1moI5l-0007PX-8C for guix-patches@gnu.org; Fri, 19 Nov 2021 23:35:10 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1moI5l-0007z3-5l; Fri, 19 Nov 2021 23:35:09 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v2 18/26] guix: node-build-system: Add optional #:libuv? argument. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, guix-patches@gnu.org Resent-Date: Sat, 20 Nov 2021 04:35:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51838 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51838@debbugs.gnu.org Cc: Liliana Marie Prikler X-Debbugs-Original-Xcc: Liliana Marie Prikler Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.163738288130484 (code B ref 51838); Sat, 20 Nov 2021 04:35:09 +0000 Received: (at 51838) by debbugs.gnu.org; 20 Nov 2021 04:34:41 +0000 Received: from localhost ([127.0.0.1]:41217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moI5I-0007vU-NT for submit@debbugs.gnu.org; Fri, 19 Nov 2021 23:34:41 -0500 Received: from mail-qv1-f48.google.com ([209.85.219.48]:40928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moI57-0007sd-RT for 51838@debbugs.gnu.org; Fri, 19 Nov 2021 23:34:30 -0500 Received: by mail-qv1-f48.google.com with SMTP id b11so8515796qvm.7 for <51838@debbugs.gnu.org>; Fri, 19 Nov 2021 20:34:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=+M7BkILfvaDvHhFF7GYGYSQ2zdft7t4HqBqhL66EJMM=; b=IlbqRM7Ir+EgmPyCcb5wQxvAn69io97qsd52ASUhS6x44xWnFyQj1Km0YlomjxJW45 xjTn/1w6gewYSq46YU31sU9fzUbcL8KORj18bDiS5N6uLUF/Uhjh04XhRgeiZ6RBc6lt +V98DNaEQYlT8wja3+y0zvLh/49m6LfGsAPdKwb1s2rgtklgABvWVtiJZb5QbhRzydeK Q5AsLamYL7cP/4davkm0NRG2WIKq6cwM/PqFfPt6mYt2OCc8DucBqQK0Pc5e5h/o9JLs qBeXTIDRZWhQEjBZOIr44ehCt35kk2JsgSXYqf3gTewhRWMC2F0x3XdDGXKA+jPXRgKL hWJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+M7BkILfvaDvHhFF7GYGYSQ2zdft7t4HqBqhL66EJMM=; b=0OTo4VHHv6HYbZXOF451OvbxIFXiTJ64w/1RjwlV6tRroBgaPutpuZRDPZOC7ixLQZ OSpgfj6207r6xh0yGyPneQUW5g6Wf5pveGt7pdEgwy6aLC3X384HL+8YbJ8uSbOffL3T zHFMOIX1RG5RjhaHEe6yosbIHB54nkGpQad2MyAE0PEsixdRVqK9Yah4MwZr8JMdruDM r6jMc4yfTSP+dgAIrwcG+NSREnZrWa/z8QSvAa8ZVwKZOUMJ3Ls1XHydrBevdo2bJ7G2 Md9PWaVY+Z7CFDCbwVy++Q215O6qas3l6afA1VJhL2BOQskJONTDjDZ6POgN2jDdSUGv dsbQ== X-Gm-Message-State: AOAM530PaKCtmXPzTmEvj8u1pZvpVts3KRLhv5FXmua0fkaL4iwd2VbR GM04g6ByYd6hccWf2JuLJxB+ar3jS9RDvhU0 X-Google-Smtp-Source: ABdhPJzDqMZl+4S4/4dif1/jPOMuXr2sxfNrCuvfCmZZZAkByC0lkF+8iP62keT7lfMMwH39fP0NTg== X-Received: by 2002:a05:6214:2342:: with SMTP id hu2mr71958966qvb.9.1637382864405; Fri, 19 Nov 2021 20:34:24 -0800 (PST) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id bq36sm932220qkb.6.2021.11.19.20.34.24 for <51838@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Nov 2021 20:34:24 -0800 (PST) From: Philip McGrath Date: Fri, 19 Nov 2021 23:33:58 -0500 Message-Id: <20211120043406.952350-18-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211120043406.952350-1-philip@philipmcgrath.com> References: <5a04aa92-e80d-e11b-235c-b7f5e3a92d00@philipmcgrath.com> <20211120043406.952350-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/build-system/node.scm (lower): Add an optional #:libuv? argument to tell the build system to add the version of libuv used as an input to the #:node package as an additional implicit input, so that packages needing libuv always get the correct version. --- guix/build-system/node.scm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm index 75ae34508f..f83a7f64ce 100644 --- a/guix/build-system/node.scm +++ b/guix/build-system/node.scm @@ -1,6 +1,8 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Jelle Licht ;;; Copyright © 2019 Timothy Sample +;;; Copyright © 2021 Pierre Langlois +;;; Copyright © 2021 Philip McGrath ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,12 +46,13 @@ (define (default-node) (define* (lower name #:key source inputs native-inputs outputs system target (node (default-node)) + (libuv? #f) (absent-dependencies ''()) #:allow-other-keys #:rest arguments) "Return a bag for NAME." (define private-keywords - '(#:source #:target #:node #:inputs #:native-inputs)) + '(#:source #:target #:node #:libuv? #:inputs #:native-inputs)) (and (not target) ;XXX: no cross-compilation (bag @@ -59,10 +62,18 @@ (define private-keywords `(("source" ,source)) '()) ,@inputs - ;; Keep the standard inputs of 'gnu-build-system'. ,@(standard-packages))) (build-inputs `(("node" ,node) + ;; Many packages with native addons need + ;; libuv headers. The libuv version must + ;; be exactly the same as for the node + ;; package we are adding implicitly, + ;; so we take care of adding libuv, too. + ,@(if libuv? + `(("libuv" ,@(assoc-ref (package-inputs node) + "libuv"))) + '()) ,@native-inputs)) (outputs outputs) (build node-build)