From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 19 23:34:41 2021 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 To: 51838@debbugs.gnu.org Subject: [PATCH v2 18/26] guix: node-build-system: Add optional #:libuv? argument. 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-Debbugs-CC: Pierre Langlois X-Debbugs-CC: Liliana Marie Prikler Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 51838 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.3 (/) * 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) -- 2.32.0