Commit Graph

342 Commits

Author SHA1 Message Date
Uri Baghin
c3a0ba0b11
Merge pull request #169703 from r-ryantm/auto-update/bazel-buildtools
bazel-buildtools: 5.0.1 -> 5.1.0
2022-04-24 17:23:41 +10:00
github-actions[bot]
fddf656b60
Merge master into staging-next 2022-04-23 18:01:13 +00:00
betaboon
51114edb8f bazel_3: fix build with gcc11 2022-04-22 19:21:15 +02:00
R. Ryantm
f3d888fc30 bazel-buildtools: 5.0.1 -> 5.1.0 2022-04-22 06:06:30 +00:00
Ben Siraphob
259fa13d53 treewide: remove nativeBuildInputs that are in stdenv 2022-04-16 21:46:46 +03:00
Vladimír Čunát
d5d94127fd
Merge branch 'staging-next' into staging
Minor conflicts; I hope I didn't mess up:
	pkgs/development/tools/misc/binutils/default.nix
	pkgs/games/openjk/default.nix
2022-04-14 09:53:21 +02:00
betaboon
8c5ed979be bazel_5: 5.0.0 -> 5.1.1 2022-04-13 12:53:42 +02:00
Ben Siraphob
ed863440b8
Merge pull request #163924 from OPNA2608/fix/autoPatchelfHook_isLinux 2022-03-26 16:01:56 -05:00
OPNA2608
d2f268745a treewide: autoPatchelfHook only on Linux 2022-03-23 21:37:39 +01:00
R. Ryantm
03aee6a526 bazel-remote: 2.3.5 -> 2.3.6 2022-03-17 03:09:27 +00:00
R. Ryantm
8977f6379b bazel-remote: 2.3.4 -> 2.3.5 2022-03-16 00:01:05 +00:00
R. Ryantm
0a4f8a4984 bazel-remote: 2.3.3 -> 2.3.4 2022-02-24 02:08:19 +00:00
R. Ryantm
f018a19f79 bazel-buildtools: 5.0.0 -> 5.0.1 2022-02-12 01:28:50 +00:00
R. Ryantm
e215391451 bazel-buildtools: 4.2.5 -> 5.0.0 2022-02-11 12:49:23 +00:00
Uri Baghin
2b1e0f392c
Merge pull request #155949 from gbpdt/fix/bazel_runtime_deps
bazel_3, bazel_4: Explicitly add a dependency on bazel-rc
2022-02-07 21:44:30 +11:00
Felix Buehler
e67ee13da7 treewide: rename name to pname&version 2022-02-01 23:01:51 +01:00
zowoq
45bd0fd536 bazel-remote: update vendorSha256 2022-01-31 13:41:40 +10:00
Uri Baghin
4ff1e8deaf
Merge pull request #156110 from r2r-dev/init-bazel_5
bazel_5: init at 5.0.0
2022-01-26 11:14:47 +11:00
r2r-dev
ed55d1f607
bazel_5: Explicitly add a dependency on bazel-rc
Co-authored-by: Uri Baghin <uri@canva.com>
2022-01-25 12:23:48 +01:00
r2r-dev
e1a28002a3 bazel_5: Build xcode-locator selectively for x86_64 (on "x86_64-darwin") or arm64 (on "aarch64-darwin") 2022-01-25 02:44:32 +01:00
r2r-dev
04500fd3a2 bazel_5: Build xcode-locator as a universal binary only on "aarch64-darwin" 2022-01-25 01:51:29 +01:00
r2r-dev
6cd1a18620 bazel_5:
- do not build xcode-locator as universal binary
- disable layering_check feature preventing grpc from compiling on darwin
2022-01-25 00:01:11 +01:00
R. Ryantm
fff9730ce0 bazel-buildtools: 4.2.4 -> 4.2.5 2022-01-23 22:06:48 +00:00
r2r-dev
a8de70bcc6
bazel_5: removed trailing spaces
Co-authored-by: divanorama <divanorama@gmail.com>
2022-01-23 14:46:12 +01:00
r2r-dev
a3de5e71f9 bazel_5: remove patching of tools/xcode/realpath/BUILD and tools/xcode/stdredirect/BUILD in darwinPatches as these files do not exist anymore 2022-01-22 14:19:16 +01:00
r2r-dev
eeede61892 bazel_5: init at 5.0.0
Bazel 5 is going to be a second long term support release.

Changes from bazel_4:
- compile java_tools (such as ijar) using nix-provided jdk
- local jvm and jdk are now passed using --tool_java_runtime_version, --tool_java_runtime_version and --extra_toolchains flags
  see https://docs.bazel.build/versions/5.0.0/bazel-and-java.html for details
- update-srcDeps.py: distdir_tar function renamed to _distdir_tar to properly parse bazel query output executed against bazel 5 sources
- bazel_5.updater: uses bazel_4 to generate src-deps.json. This change was required to handle json.decode calls in bazel 5 dependencies
- protobuf-test and java-test adjusted to take into consideration both jdk 8 (for Bazel < 5.0.0) and jdk 11 (for Bazel >= 5.0.0)

https://blog.bazel.build/2022/01/19/bazel-5.0.html
https://github.com/bazelbuild/bazel/releases/tag/5.0.0
2022-01-22 10:23:04 +01:00
Graham Bennett
eda51e3ea8 bazel_3, bazel_4: Explicitly add a dependency on bazel-rc
This resolves an issue where the path to the bazel-rc file is sometimes
optimised so the full hash is not present, and hence not picked up by
the scan as a runtime dependency.
2022-01-20 21:06:40 +00:00
Matthieu Coudron
c1220ff9b0
bazel_4: dont propagate absl-py (#153779)
otherwise bazel pollutes PYTHONPATH and if it's just necessary to generate the fish completion then we dont need to propagate it
2022-01-07 01:43:10 -05:00
R. Ryantm
ee250452c4 bazel-remote: 2.3.1 -> 2.3.3 2021-12-27 01:39:10 +00:00
R. Ryantm
8ff4f43381 bazel-remote: 2.3.0 -> 2.3.1 2021-12-24 01:35:09 +00:00
Uri Baghin
72e45af374
Merge pull request #151503 from timothyklim/bazel-4.2.2
bazel_4: 4.2.1 -> 4.2.2
2021-12-21 16:02:06 +11:00
Timothy
13c152bb1c bazel_4: 4.2.1 -> 4.2.2 2021-12-21 10:19:05 +07:00
Uri Baghin
d2a93c1fc1
Merge pull request #146389 from ylecornec/ylecornec/bazel_bash_fix
Consistent PATH between ctx.actions.run and ctx.actions.run_shell
2021-12-20 10:00:16 +11:00
Yves-Stan Le Cornec
cd842a9e42 bazel_4: remove duplicated python paths from the nix-support/depends file. 2021-12-17 08:47:00 +01:00
Profpatsch
924725cc9a bazel: add README file to point to the maintainers team. 2021-12-16 17:47:34 +01:00
Profpatsch
5238c41fa0 team-list: add bazel team
(refactor)

We are going to set up a maintenance team for bazel & tools.
2021-12-16 17:47:34 +01:00
Yves-Stan Le Cornec
ee62812f01 bazel_4: add default tools to buildInputs (to be accessible from repository rules)
Previously the customBash wrapper added the default tools to the PATH of commands from repository rules (which are run in the same environment as Bazel).
2021-12-16 10:25:31 +01:00
Yves-Stan Le Cornec
b55758e4f5 bazel_4: make some tests more verbose to help debugging
Co-Authored-By: Uri Baghin <33242106+uri-canva@users.noreply.github.com>
2021-12-15 17:11:38 +01:00
Yves-Stan Le Cornec
b147f2111d bazel_4: add default PATH for local actions if it is not set (darwin)
Co-Authored-By: Uri Baghin <33242106+uri-canva@users.noreply.github.com>
2021-12-15 17:07:30 +01:00
Yves-Stan Le Cornec
2aea3ebc9c bazel_4: add which binary to test buildInputs
The which binary is used by the tests to find python location from the PATH.
2021-12-15 15:53:56 +01:00
Yves-Stan Le Cornec
be9385ce59 bazel_4: remove customBash script
In order to remove duplicates in PATH when run_shell is called, the customBash script is removed.
This is consistent with how other platform behave: only look in the local environment if PATH is not set, but it may break builds that explicitly expects a different local environment.
2021-12-13 08:32:24 +01:00
Yves-Stan Le Cornec
0cff50f78e bazel_4: add default PATH for local actions if it is not set.
https://github.com/NixOS/nixpkgs/issues/94222
fixup1
2021-12-10 17:50:37 +01:00
Uri Baghin
ec68e9736c
Merge pull request #148859 from r-ryantm/auto-update/bazel-remote
bazel-remote: 2.2.0 -> 2.3.0
2021-12-08 08:46:00 +11:00
R. Ryantm
7366bbb3c5 bazel-remote: 2.2.0 -> 2.3.0 2021-12-06 04:37:00 +00:00
R. Ryantm
e62a334eae bazel-buildtools: 4.2.3 -> 4.2.4 2021-12-06 04:23:31 +00:00
Wael Nasreddine
c691e088d7
bazel_4: Fix Bazel-built protoc segfault on macOS Monterey (#147097)
This was fixed by enabling the user_link_flags_feature for macosx cc_toolchain_config.

References:
- https://github.com/bazelbuild/bazel/issues/14216
- https://github.com/bazelbuild/bazel/pull/14275
2021-11-24 10:55:14 -08:00
Jörg Thalheim
324d5b3ee8
Merge pull request #145709 from winterqt/bazel-md5sum
bazel: replace additional usages of md5sum
2021-11-13 22:51:21 +00:00
Winter
21727e4915 bazel: replace additional usages of md5sum 2021-11-12 21:50:32 -05:00
Uri Baghin
61c121424d
bazel_4: link to issue about aarch64-darwin 2021-11-12 21:58:45 +11:00
Uri Baghin
64144e80df bazel_4: disable install check on aarch64-darwin 2021-11-12 10:32:59 +01:00
Sandro Jäckel
8547db919a
treewide: switch `builtins.fromJSON(builtins.readFile ./file.json)` to lib.importJSON ./file.json 2021-11-03 14:43:52 +01:00
Bobby Rong
6bd0720270
Merge pull request #143538 from r-ryantm/auto-update/bazel-remote
bazel-remote: 2.1.3 -> 2.2.0
2021-10-29 12:43:38 +08:00
R. Ryantm
74df451f60 bazel-remote: 2.1.3 -> 2.2.0 2021-10-29 02:38:39 +00:00
R. Ryantm
5f33ec4892 bazel-buildtools: 4.2.0 -> 4.2.3 2021-10-29 02:28:57 +00:00
github-actions[bot]
00e2bbfcff
Merge staging-next into staging 2021-09-17 06:02:03 +00:00
Bobby Rong
a3c4956cf9
Merge pull request #136004 from timothyklim/bazel-4.2.0
bazel_4: 4.1.0 -> 4.2.1
2021-09-17 10:45:20 +08:00
R. RyanTM
2d7ee6ac56 bazel-remote: 2.1.1 -> 2.1.3 2021-09-15 06:51:53 +00:00
R. RyanTM
c9e42a65d2 bazel-buildtools: 4.0.1 -> 4.2.0 2021-09-14 01:53:07 +00:00
Timothy
4b8c664c7e bazel_4: 4.1.0 -> 4.2.1 2021-08-31 02:23:16 +07:00
zowoq
13ea123c74 treewide: buildFlagsArray -> ldflags 2021-08-26 21:35:06 +10:00
R. RyanTM
db961ec5bc bazel-remote: 2.1.0 -> 2.1.1 2021-06-24 05:12:00 +00:00
R. RyanTM
818201e4b5 bazel-remote: 2.0.1 -> 2.1.0 2021-06-17 17:21:34 +02:00
Dmitry Ivankov
a15204fcc0 bazel_4: 4.0.0 -> 4.1.0
https://github.com/bazelbuild/bazel/releases/tag/4.1.0

other minor changes:
- grep for /bin/ rather than /bin for blanket substitute
- invoke {pre,post}{Build,Install} hooks
2021-05-22 09:51:22 +02:00
Uri Baghin
a975c80f91 bazel-remote: 1.0.0 -> 2.0.1 2021-05-17 23:21:53 +02:00
Andrew Childs
7869d16545 llvmPackages: Multuple outputs for everythting
Also begin to start work on cross compilation, though that will have to
be finished later.

The patches are based on the first version of
https://reviews.llvm.org/D99484. It's very annoying to do the
back-porting but the review has uncovered nothing super major so I'm
fine sticking with what I've got.

Beyond making the outputs work, I also strove to re-sync the packages,
as they have been drifting pointlessly apart for some time.

----

Other misc notes, highly incomplete

- lvm-config-native and llvm-config are put in `dev` because they are
  tools just for build time.

- Clang no longer has an lld dep. That was introduced in
  db29857eb3, but if clang needs help
  finding lld when it is used we should just pass it flags / put in the
  resource dir. Providing it at build time increases critical path
  length for no good reason.

----

A note on `nativeCC`:

`stdenv` takes tools from the previous stage, so:

1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.stdenv.cc`: `(?0, ?1, x)`

while:

1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.targetPackages`: `(x, x, ?2)`
3. `pkgsBuildBuild.targetPackages.stdenv.cc`: `(?1, x, x)`
2021-04-30 05:41:00 +00:00
Mario Rodas
ec2e4b2d74 bazel-buildtools: 3.5.0 -> 4.0.1 2021-04-11 04:20:00 +00:00
Frederik Rietdijk
490bdd203c bazel_0_26: use python3 2021-03-25 10:39:17 +01:00
Matthieu Coudron
810d22fb35
Merge pull request #111975 from teto/bazel-execlog
bazel: add execlog parser
2021-03-22 10:43:17 +01:00
Matthieu Coudron
ef1045cd64 bazel_4: add bazel-execlog binary
similar to what was done for bazel 3
2021-03-17 00:13:58 +01:00
Matthieu Coudron
0b9f90ef5f bazel: add execlog parser
This is a tool to help troubleshoot debug issues:
https://docs.bazel.build/versions/master/remote-execution-caching-debug.html
2021-03-16 17:18:18 +01:00
Ben Siraphob
4f0cdb68d7 treewide: unzip buldInputs to nativeBuildInputs (2) 2021-03-06 15:18:05 +07:00
Dmitry Ivankov
cf1935583e bazel_4: update src-deps after java update 2021-02-04 20:38:08 +01:00
Claudio Bley
b56ac70602 bazel_4: Use jdk11_headless to build bazel
Use the same JDK for building bazel and for its runtime.

Effectively, the former `toolchain_hostjdk8` java toolchain has been deprecated
and should no longer be used (in newer bazel)[1]:

```
default_java_toolchain(
    name = "toolchain_hostjdk8",
    ...
)
```

[1]: 4fc4868065/tools/jdk/BUILD.tools (L384-L387)
2021-02-04 20:33:40 +01:00
Claudio Bley
b461c9e5bc bazel_4: Fix build on darwin
* use default stdenv (clang 7)
* add no-arc.patch to make the xcode_locate tool compile without libarc-lite
* remove the `-mmacosx-version-min=10.9` flag from the bootstrap compile script
2021-02-04 20:31:43 +01:00
Dmitry Ivankov
56c25c5653 bazel: fix protobuf-test compatibility with bazel_4
- bump protobuf to 3.13.0
- use recent rules_proto
- use recent bazel-skylib
- remove use of native.bind

Hopefully this is backward-compatible with bazel_3 and below
2021-02-04 20:24:56 +01:00
Dmitry Ivankov
2751275f1a bazel_4: bump examples repo just in case 2021-02-04 20:24:56 +01:00
Dmitry Ivankov
cd65145664 bazel: cosmetic fix: test name cpp->java 2021-02-04 20:24:55 +01:00
Dmitry Ivankov
55a810443d bazel_4: use --verbose_failures for the build 2021-02-04 20:24:55 +01:00
Dmitry Ivankov
0f5783f80a bazel_4: init at 4.0.0
Bazel 4 is going to be a long term support release.

Latest version in NixPkgs so far was 3.3.1
There's a need for more recent version
https://github.com/NixOS/nixpkgs/issues/97497

All versions from 3.5.0 to 3.7.1 had some reproducibility issues
as noted in issue above, but there also seems to be
a working PR for 3.7.1 now at
https://github.com/NixOS/nixpkgs/pull/105439

Notable changes from bazel_3 setup:
- put python to default bash path

  For autodetecting python toolchain
  with strict action_env on and without this change
  bazel would fail to autodetect host python.

  There are some repos that define hermetic python
  toolchains, but they aren't easy to use yet. Also
  telling python paths to bazel isn't a 1-liner it
  seems:
  - action_env=PATH would affect cache
  - declaring toolchain via BUILD&WORKSPACE files
    is not per-user but more like per-repo and
    affects cache too

  Using python from nixpkgs shouldn't be too bad
  in the lack of simpler hermetic python toolchain
  options

- bazel_4.updater is bazel on `bazel query` to support
  new constructs in WORKSPACE (load of vars, transitive
  load etc). This is more robust but requires bazel
  to run the updater, using bazel_3 for now. This is
  only needed to bump package version, doesn't introduce
  bazel_4 build dependency on bazel_3

https://blog.bazel.build/2020/11/10/bazel-4.0-announce.html
https://blog.bazel.build/2020/11/10/long-term-support-release.html
https://github.com/bazelbuild/bazel/issues/12455
https://github.com/bazelbuild/bazel/releases/tag/4.0.0
https://blog.bazel.build/2021/01/19/bazel-4-0.html
2021-02-04 20:24:54 +01:00
Claudio Bley
a42d59b208 bazel-remote: Mark as broken on Darwin
It currently fails during compilation because C++ standard
header files cannot be found.
2021-02-03 11:51:11 +01:00
Claudio Bley
a6e18b4758 bazel: Reword comment that memory leaks are acceptable
Co-authored-by: Greg Roodt <groodt@gmail.com>
2021-02-03 10:46:09 +01:00
Claudio Bley
5f71a0ff5d bazel: Fix build on darwin
* use default stdenv (clang 7)
* add no-arc.patch to make the xcode_locate tool compile without libarc-lite
* remove the `-mmacosx-version-min=10.9` flag from the bootstrap compile script
2021-02-03 10:46:09 +01:00
Claudio Bley
e22cf98520 bazel: Use jdk11_headless to build bazel
Use the same JDK for building bazel and for its runtime.

Effectively, the former `toolchain_hostjdk8` java toolchain has been deprecated
and should no longer be used (in newer bazel)[1]:

```
# Deprecated, do not use.
# It will be removed after migration to Java toolchain resolution.
default_java_toolchain(
    name = "toolchain_hostjdk8",
    ...
)
```

[1]: 4fc4868065/tools/jdk/BUILD.tools (L384-L387)
2021-02-03 10:46:09 +01:00
Claudio Bley
6d8c431eb0 bazel: 3.7.1 -> 3.7.2
* update sha256 for gvisor, tensorflow{,WithCuda}, bazel-watcher, bazel-remote
  and envoy
2021-02-03 10:44:07 +01:00
Claudio Bley
71cda4f111 bazel: 3.3.1 -> 3.7.1
* remove python-shebang patch since it was integrated upstream[1]

[1]: https://github.com/bazelbuild/bazel/pull/11535/files
2021-01-29 21:53:25 +01:00
Pavol Rusnak
a6ce00c50c
treewide: remove stdenv where not needed 2021-01-25 18:31:47 +01:00
Ben Siraphob
c522fec274 pkgs/development/tools: stdenv.lib -> lib 2021-01-23 20:30:03 +07:00
Claudio Bley
9aac494076 bazel-buildtools: 3.3.0 -> 3.5.0 2020-12-18 23:36:31 +01:00
Matthieu Coudron
1f9ab74d4c buildBazelPackage: build name from pname/version
and updated bazel-remote accordingly.
2020-10-28 17:55:10 +01:00
Marco Farrugia
ffac55a0da format 2020-10-19 18:32:48 +02:00
Marco Farrugia
a360b05cb7 bazel: Fix bazel query and provide a default java toolchain
These are fixes for problems I ran into with:
- `bazel test //example:cpp-test`
This needed `build --host_javabase='@local_jdk//:jdk'`

- `bazel query 'deps(//example:cpp-test)'`
This needed the same flags as `build`.

Is it contentious to (partially?) configure the default java toolchain? I don't see it as much different than providing the bazel server's java.
It would continue to be configurable/overridable by overriding the flags. 

---
And a random notes from this escapade, but https://github.com/bazelbuild/bazel/blob/master/WORKSPACE#L144-L308 looks a little different from https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/build-managers/bazel/bazel_3/src-deps.json so one of them is probably wrong :)
2020-10-19 18:32:48 +02:00
Ben Siraphob
683a87dbeb treewide: remove periods from end of package descriptions 2020-10-17 08:22:31 -07:00
Robert Scott
96e42b0f55
Merge pull request #100012 from tricktron/fix-bazel_1-darwin
bazel_1: fix build on darwin
2020-10-10 18:24:52 +01:00
Thibault Gagnaux
f7aafe6345 bazel_1: fix build on darwin
Use clang_8 instead of clang_7 on darwin to fix thread_local storage error.
2020-10-10 15:46:17 +02:00
Thibault Gagnaux
fd2c495e97 bazel_0: fix build on darwin
Fixes `error: thread-local storage is not supported for the current target` by
upgrading clang_7 -> to clang_8 which supports thread-local storage.
2020-10-08 16:03:44 +02:00
Matthew Bauer
3777a4af76 bazel: pass -stdlibc=libc++ correctly
Fixes #93787
2020-08-26 15:52:38 -05:00
zowoq
a83a88db05 buildGoPackage: remove platform.all from packages 2020-08-15 19:34:47 -07:00
Wael Nasreddine
866eedcb69
bazel_3: use less resources when building Bazel (#95214)
Limit the resources Bazel is allowed to use during the build to 1/2 the
available RAM and 3/4 the available CPU cores. This should help avoid
overwhelming the build machine.
2020-08-12 10:47:01 -07:00
Profpatsch
595afc2c3f bazel: use installShellCompletion for completions 2020-07-17 15:38:49 +02:00
Profpatsch
a06fda4c5d bazel: add fish completions
bazel 3.3 adds a first version of completions for fish shell.

Tested manually whether fish is able to load the completions.
2020-07-17 15:38:49 +02:00