mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
opcua-commander: fix build on darwin (#382748)
* opcua-commander: fix build on darwin * opcua-commander: prefer optionalString to construct CLI arguments https://github.com/NixOS/nixpkgs/pull/382748#discussion_r1958311936 Co-authored-by: Sandro Jäckel <sandro.jaeckel@gmail.com> Co-authored-by: Kenichi Kamiya <kachick1@gmail.com> --------- Co-authored-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
29f6170dc8
commit
c9377b15aa
1 changed files with 13 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
stdenv,
|
||||||
buildNpmPackage,
|
buildNpmPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
typescript,
|
typescript,
|
||||||
|
@ -25,10 +26,18 @@ buildNpmPackage rec {
|
||||||
makeWrapper
|
makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch =
|
||||||
substituteInPlace package.json \
|
let
|
||||||
--replace-warn "npx -y esbuild" "esbuild"
|
esbuildPrefix =
|
||||||
'';
|
"esbuild"
|
||||||
|
# Workaround for 'No loader is configured for ".node" files: node_modules/fsevents/fsevents.node'
|
||||||
|
# esbuild issue is https://github.com/evanw/esbuild/issues/1051
|
||||||
|
+ lib.optionalString stdenv.hostPlatform.isDarwin " --external:fsevents";
|
||||||
|
in
|
||||||
|
''
|
||||||
|
substituteInPlace package.json \
|
||||||
|
--replace-fail 'npx -y esbuild' '${esbuildPrefix}'
|
||||||
|
'';
|
||||||
|
|
||||||
# We need to add `nodejs` to PATH for `opcua-commander` to properly work
|
# We need to add `nodejs` to PATH for `opcua-commander` to properly work
|
||||||
# when connected to an OPC-UA server.
|
# when connected to an OPC-UA server.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue