guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#49946] [PATCH 08/31] gnu: node: Patch /usr/bin/env in node-gyp.


From: Philip McGrath
Subject: [bug#49946] [PATCH 08/31] gnu: node: Patch /usr/bin/env in node-gyp.
Date: Wed, 29 Sep 2021 02:31:46 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 9/25/21 6:24 AM, Pierre Langlois wrote:
For instance, while working on a newer version of one of the packages in
this series, I saw we may need to patch GYP's python reference as well,
like so:

(substitute* "deps/npm/node_modules/node-gyp/gyp/gyp_main.py"
   (("#!/usr/bin/env python")
    (string-append "#!" (assoc-ref inputs "python") "/bin/python3")))

Only for node 14+. The reason seems to be that gyp still refers to
"python", but python2 is no longer a dependency for newer nodes. And it
seems GYP is perfectly happy with python3, and the shebang is fixed
upstream so a never node will be fine:
https://github.com/nodejs/node-gyp/pull/2355/files

I think this needs to be a `python` from `inputs` rather than `native-inputs`, for cross-compilation, IIUC.

I tried building node 14.18.0, and it ran into other issues, but there were still a number shebangs with `python` rather than `python3` in various places, though I think they'd be fine with `python-wrapper`.

-Philip





reply via email to

[Prev in Thread] Current Thread [Next in Thread]