Bazel: Difference between revisions

imported>Dmayle
No edit summary
Update deprecated function
Tags: Mobile edit Mobile web edit Visual edit
 
(2 intermediate revisions by 2 users not shown)
Line 7: Line 7:
   { pkgs ? import <nixpkgs> {} }:
   { pkgs ? import <nixpkgs> {} }:
    
    
   (pkgs.buildFHSUserEnv {
   (pkgs.buildFHSEnv {
     name = "bazel-userenv-example";
     name = "bazel-userenv-example";
     targetPkgs = pkgs: [
     targetPkgs = pkgs: [
Line 22: Line 22:
== Troubleshooting ==
== Troubleshooting ==
In some versions of bazel, the sandboxing does not inherit the FHS environment, and elements of the toolchain (notably {{ic|protoc}}) may fail to run.  In that case, switching to {{ic|pkgs.bazel_4}} should solve the problem.
In some versions of bazel, the sandboxing does not inherit the FHS environment, and elements of the toolchain (notably {{ic|protoc}}) may fail to run.  In that case, switching to {{ic|pkgs.bazel_4}} should solve the problem.
== See also ==
* [https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/build-bazel-package/default.nix buildBazelPackage implementation]
* [https://sourcegraph.com/search?q=context:global+buildBazelPackage+lang:nix+repo:%5Egithub%5C.com/NixOS/nixpkgs%24+&patternType=standard buildBazelPackage used in nixpkgs]


[[Category:Applications]]
[[Category:Applications]]