From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WPsoAdFKTGFoQAAAgWs5BA (envelope-from ) for ; Thu, 23 Sep 2021 11:37:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cJuOONBKTGExJwAAB5/wlQ (envelope-from ) for ; Thu, 23 Sep 2021 09:37:20 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5976EBF39 for ; Thu, 23 Sep 2021 11:37:20 +0200 (CEST) Received: from localhost ([::1]:39480 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTLAM-0001oI-G4 for larch@yhetil.org; Thu, 23 Sep 2021 05:37:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTKsh-00008V-MX for guix-patches@gnu.org; Thu, 23 Sep 2021 05:19:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41172) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTKsg-0003kL-Bi for guix-patches@gnu.org; Thu, 23 Sep 2021 05:19:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTKsg-0003lR-4Q for guix-patches@gnu.org; Thu, 23 Sep 2021 05:19:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH 08/31] gnu: node: Patch /usr/bin/env in node-gyp. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Sep 2021 09:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49946 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos , Pierre Langlois , 49946@debbugs.gnu.org Received: via spool by 49946-submit@debbugs.gnu.org id=B49946.163238873614456 (code B ref 49946); Thu, 23 Sep 2021 09:19:02 +0000 Received: (at 49946) by debbugs.gnu.org; 23 Sep 2021 09:18:56 +0000 Received: from localhost ([127.0.0.1]:52718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTKsa-0003l6-2l for submit@debbugs.gnu.org; Thu, 23 Sep 2021 05:18:56 -0400 Received: from mail-qt1-f182.google.com ([209.85.160.182]:42998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTKsW-0003kr-UI for 49946@debbugs.gnu.org; Thu, 23 Sep 2021 05:18:55 -0400 Received: by mail-qt1-f182.google.com with SMTP id w17so5535599qta.9 for <49946@debbugs.gnu.org>; Thu, 23 Sep 2021 02:18:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=Dyz0CNDLY7PJ+SB1db34tUNBDqu2SkATL0F3ZsLfvyM=; b=j/A+N916gm51dqdc/PPnl5eK8uk7ZJRByXS+9TQTfsMTVLctQMM1dMiklFlIX8Im8K 8RsJvZItr3+rOyfwb4Oyl7jSuFaIVUG35ajIOTL2BuNOuv2j+31FOgv2TzbdUFdqBMLQ 2cYxnm8YevQBY/SNqulheixNxBP5+7tTCkAnQ9+V8LypzJpH0S/4G0gpmdzo+UvqHqQj VEaBJJ6MMOxOAmsxuLvs96IvXXG4EBhBCoVAwvYFZgIAz2wND3KIq9Z0N3nLUUoR8x0Y jQii13ZDxWd10IHyvjGvQXTAm+V6bZVBXVwOKJyfU/WlloSIKmTVvy308tJUZIFWUv85 WFNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Dyz0CNDLY7PJ+SB1db34tUNBDqu2SkATL0F3ZsLfvyM=; b=Vvu7brLmUTButzCV/+S81XttFjv7IKZBHqIWJvWTE5oHbWUMclyPbOtSfi2rKgbU3z eifoSlHWhePaglijLkvnKckOIOloYnb3kWLnqv6ZXOTD/hCkEtuAc5uw6s1xUcTmOLWu i5+4IuXWbEh0DWbnNmPAzM4uN8ww1kc9bKio6StHb6Ot1tmNo1ZMNMtfW3yA+MA3UPBV 1yIjq5MvH0rFGCiBPltANc2U9GQXeS3BIPRH/eK5bKPr8iYTf2LqsFlljpT4G82tvA/1 HitGCmc0hB+DEeewi8emO11Z5muIIbizoI9cSBFEQ82jm8C2xtSRlkeavoZu/5dPLfa4 KFlg== X-Gm-Message-State: AOAM531JLtH3qRwgjWzaH1Ke8zlAeEYLNB+bMlvlL4fF6AnCwZZCt5RT d9+Ps+AA1x1Rti8nakUM/QrSkfVc/BvfcKfm X-Google-Smtp-Source: ABdhPJzAW6bjRRAWqN2Jwv2rRD4vVqVchTuU3DBHdZ6x9P/gl83wDnLpHYbyGAq/KV+RTERyHItEYA== X-Received: by 2002:ac8:5290:: with SMTP id s16mr3603367qtn.412.1632388727271; Thu, 23 Sep 2021 02:18:47 -0700 (PDT) Received: from ?IPv6:2601:589:4900:c80:3911:a236:500:1c5d? ([2601:589:4900:c80:3911:a236:500:1c5d]) by smtp.gmail.com with ESMTPSA id g8sm2817217qtp.62.2021.09.23.02.18.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Sep 2021 02:18:47 -0700 (PDT) References: <87h7fztt60.fsf@gmx.com> <20210808233354.6745-1-pierre.langlois@gmx.com> <20210808233354.6745-8-pierre.langlois@gmx.com> <42e10baddb6afe308f67c3240bf5da8159e6f118.camel@telenet.be> From: Philip McGrath Message-ID: Date: Thu, 23 Sep 2021 05:18:46 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <42e10baddb6afe308f67c3240bf5da8159e6f118.camel@telenet.be> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632389840; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Dyz0CNDLY7PJ+SB1db34tUNBDqu2SkATL0F3ZsLfvyM=; b=EXed9N/QOCx+egVg473zoI3/dQZjH2AJ/sdqbwJutKRzt1wEI53et574nzmqOWphdPA5p/ ofN+Gpz0EmMJ//LGkhNjjr1/NqoFrze1ZTnWUs6uKCOFB/wmJ4khxv63zLM3YE53OFqQ30 rFsNKK6c24TisNQzilNGnviUI+BhI1tETws/ECWNt5JT6oi/JW2rZ1AcP8YP/02Or6Js4U agF1HIq9XyJwpeJs8L2whl6nXKA3Wf8u3IBCXvRBe0a6633ayKxfWI4W7uo8UocGSGFBrf l4SqKD8wxficwlA/at+YUZMl99mVpc17/RNONlzM1NE0crHez6mNHwFRKvOcXQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632389840; a=rsa-sha256; cv=none; b=qpXwqQ6xAFYmLIKHylLLT4BoHTSIP8pFm0ZoBeFu/PPWA6iafRuZRaL1E7meMYxIP8knrm ZCcQ7LgfITH7EEIF81Omc/JOFigrILfpqMhF+bic0J8jmQoF3lPzKHD6nBvQ3qfrf0nhoQ nn7onFQSYXg3RrgY/ZoXXVtfqtqDAvjOLFmdF1j92KeGrVBwHewGt/npbOBOxvTTfELhe6 O2L721FG9z3p2Nww8CRSxqK8SkOIC2klI/ap4v4SdMPlkGkjKbKe8zlrGROX4Je8IEE7cx /qV/8I4o87A6juq1ML0WQp2qrat1onxVmJhGhMW9GJp2VkzcFOUXu1GfiqcpAA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b="j/A+N916"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.39 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b="j/A+N916"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 5976EBF39 X-Spam-Score: -1.39 X-Migadu-Scanner: scn0.migadu.com X-TUID: tdZxkGRBoIpl I'm interested in the node-gyp part of this, which has come up in some other software I'm trying to package. These comments come with the caveat that my experience with node.js and npm is fairly shallow. On 8/10/21 2:28 PM, Maxime Devos wrote: > Pierre Langlois schreef op ma 09-08-2021 om 00:33 [+0100]: >> @@ -120,6 +120,10 @@ >> (("'/usr/bin/env'") >> (string-append "'" (which "env") "'"))) >> >> + ;; Fix /usr/bin/env shebang in node-gyp. >> + (substitute* "deps/npm/node_modules/node-gyp/bin/node-gyp.js" >> + (("#!/usr/bin/env") (string-append "#!" (which "env")))) > > For cross-compilation, this should most likely be > (string-append (assoc-ref inputs "coreutils") "/bin/env") > or something like that instead. Likewise in other places. Since the shebang line for node-gyp is specifically "#!/usr/bin/env node", I wonder if it should use the node built by this package, rather than a dynamic node. More generally, I see that there are 355 directories installed under "lib/node_modules/npm/node_modules" (which corresponds to the "deps" path above). Most of them don't seem to be available as Guix packages that could be depended upon by other Guix node packages. I'd guess node-gyp may not be the only one with shebangs that ought to be patched. On 8/8/21 6:29 PM, Pierre Langlois wrote: > ... `node-gyp' needs > node headers to compile against, packaged as a tarball, which it tries > to download. Instead, we can run a `node-gyp --tarball <> configure' > step to manually provide the tarball, which we can package separately > for any given node version. There is also a --nodedir option, which I found could work with something like: (string-append "--nodedir=" (assoc-ref inputs "node")) That seems like it might be better, though I don't know all the considerations for cross-compilation and such. -Philip