node-gyp: fix cross builds
gyp was never designed for cross compiling. However, it works perfectly fine if you just replace all uses of `sys.platform` with a constant.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{
|
||||
stdenv,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
@@ -20,6 +21,7 @@
|
||||
|
||||
postPatch = ''
|
||||
ln -s ${./package-lock.json} package-lock.json
|
||||
sed -E -i -e 's/sys.platform/"${stdenv.targetPlatform.parsed.kernel.name}"/g' gyp/pylib/gyp/**.py
|
||||
'';
|
||||
|
||||
dontNpmBuild = true;
|
||||
|
||||
Reference in New Issue
Block a user