You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
using rules_node with the nixpkgs node is extremely painful and requires the workaround specified in bazel-contrib/rules_nodejs#464 / bazelbuild/bazel#2927
Specifically:
nixpkgs_package(
name = "nixpkgs_nodejs",
build_file_content = 'exports_files(glob(["nixpkgs_nodejs/**"]))',
nix_file_content = """
with import <nixpkgs> { config = {}; overlays = []; };
runCommand "nodejs-build" { buildInputs = [ nodejs ]; } ''
mkdir -p $out/nixpkgs_nodejs
cd $out/nixpkgs_nodejs
for i in ${nodejs}/*; do ln -s $i; done
''
""",
nixopts = [
"--option",
"sandbox",
"false",
],
repository = "@nixpkgs",
)
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories")
node_repositories(
vendored_node = "@nixpkgs_nodejs",
package_json = [":package.json"],
)
Describe the solution you'd like
Ideally this is a solved with a call to nixpkgs_node_configure
Describe alternatives you've considered
^ workaround described above
Having a nixpkgs_node_configure that captures that would still be great.
PRs to add this are welcome.
This should go into a separate file here or a dedicated component after #182 to not introduce a dependency on rules_nodejs to all users of rules_nixpkgs independent of whether they use this or not.
A test case would also be good. See here for a Go example.
I started looking into this but it seems like node_repositories changed quite drastically between 4.4.6 and 5.5.3. It no longer takes package_json and vendored_node parameters. I don't really have the knowledge needed to investigate this further so I'm going to unassign myself for now.
Is your feature request related to a problem? Please describe.
using rules_node with the nixpkgs node is extremely painful and requires the workaround specified in bazel-contrib/rules_nodejs#464 / bazelbuild/bazel#2927
Specifically:
Describe the solution you'd like
Ideally this is a solved with a call to
nixpkgs_node_configure
Describe alternatives you've considered
^ workaround described above
Additional context
bazel-contrib/rules_nodejs#464
bazelbuild/bazel#2927
The text was updated successfully, but these errors were encountered: