Commit Graph

281 Commits

Author SHA1 Message Date
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
Profpatsch
2ba87b6e79 bazel: use install for completions
Preserving existing behavior: the bash completion was not executable,
the zsh completion was; according to lukegb the fish completion does
not have to be executable.
2020-07-17 15:38:49 +02:00
Claudio Bley
cda852a528 bazel: 3.3.0 -> 3.3.1 2020-07-01 23:23:33 +02:00
Claudio Bley
388038ff98 bazel-buildtools: 3.2.1 -> 3.3.0 2020-06-24 17:02:23 +02:00
Claudio Bley
21a21a4224 bazel: 3.2.0 -> 3.3.0 2020-06-23 15:29:38 +02:00
Claudio Bley
9836a30422 bazel-buildtools: 3.2.0 -> 3.2.1 2020-06-17 11:11:41 +02:00
Claudio Bley
cd712e625e bazel-buildtools: 2.2.1 -> 3.2.0 2020-06-03 09:37:32 +02:00
Claudio Bley
7172514b72 bazel: 3.1.0 -> 3.2.0 2020-05-29 15:22:35 +02:00
Claudio Bley
1c5386fa1d bazel: Make bazel_3 the default version
* drop bazel_2
* update hashes of fetch derivations that use `buildBazelPackage`
2020-05-29 08:52:17 +02:00
Claudio Bley
c456288170 bazel_3: init at 3.1.0 2020-05-29 08:52:17 +02:00
Matthew Bauer
2a8d05627b build-bazel-package: switch hash mode to “flat”
flat hashes can be substituted through hashed-mirrors, while recursive
hashes can’t. This is especially important for Bazel since the bazel
fetch dependencies can come from multiple different methods (git,
http, ftp, etc.). To do this, we create tar archives from the
output/external directory, which is then extracted to build. All of
the Bazel hashes are all updated.
2020-05-09 13:33:26 -05:00
Mario Rodas
0d995eb6c4
bazel-buildtools: 1.0.0 -> 2.2.1 2020-04-10 04:20:00 -05:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Mike Sperber
677b2d818e
bazel_0_26: fix linker flags for darwin (#84614)
Same as done for bazel_0_29 in d1ee615f1c:
2020-04-08 18:48:40 -04:00
Profpatsch
955b44b3bd bazel_1: fix test paths 2020-04-08 17:50:32 +02:00
Profpatsch
e8b19c09a5 bazel_2: fix test paths
They did not survive the move into the subdirectory.
2020-04-08 17:50:32 +02:00
John Ericson
6bf6ec8a96 Merge remote-tracking branch 'upstream/master' into consistent-bazel-ref 2020-04-01 16:16:30 -04:00
John Ericson
6f94f8fd3f bazel-*: Consistently self reference
Using `bazel_self` for self-references makes managing bazel versions
easier: their less risk of changing defaults or copy pasted code for no
versions leading to incorrect self-references.
2020-04-01 16:16:26 -04:00
John Ericson
1fa310549c Merge remote-tracking branch 'upstream/master' into add-tensorflow-2 2020-03-30 13:59:16 +00:00
John Ericson
d4de62dedd bazel_0_29: init at 0.29.1
Needed for Tensorflow 2.1
2020-03-30 04:30:40 +00:00
Andreas Rammhold
d7673d7889 bazel_0: init at 0.26.0
(cherry picked from commit 1c0de27df3)
2020-03-25 11:32:39 -04:00
Janne Heß
cfe8e0e1ad pkgs/bazel*: Fix path to update-srcDeps.py
Otherwise, the -small channel fails on the tarball output.

(cherry picked from commit 0723bf3b72)
2020-03-25 11:27:15 -04:00
Michael Lingelbach
3fab55793d Add bazel 1.2.1
(cherry picked from commit 1c4f22a5da)
2020-03-25 11:27:14 -04:00
Andreas Rammhold
1c0de27df3
bazel_0: init at 0.26.0 2020-03-04 16:41:17 +01:00
Andreas Rammhold
4c00e6f654 bazel-remote: fix fixed output derivation hash 2020-03-03 14:35:24 +01:00
Andreas Rammhold
846f300511
Merge pull request #80953 from andir/bazel-poison
buildBazelPackage: poison all the fixed output derivations
2020-03-03 10:39:05 +01:00
Andreas Rammhold
0ff376c03f
bazel-remote: update fixed output hash 2020-03-03 01:12:27 +01:00
Janne Heß
0723bf3b72 pkgs/bazel*: Fix path to update-srcDeps.py
Otherwise, the -small channel fails on the tarball output.
2020-03-02 13:11:14 +01:00
Michael Lingelbach
1c4f22a5da Add bazel 1.2.1 2020-03-02 09:08:47 +01:00
Joao Neves
95c91cebf1 bazel: output correct binary name
From Bazel 2.0.0 onwards, Bazel looks for a binary named
`bazel-${version}-${os_arch}` if the project root contains a
`.bazelversion` file or the USE_BAZEL_VERSION environment
variable is set.

This change ensures we output a binary with the correct name
for the current version and OS/arch combination.
2020-02-28 12:21:22 +01:00
Joao Neves
dd413d4c2d bazel: 2.0.0 -> 2.1.0 2020-02-28 12:21:22 +01:00
Daiderd Jordan
e4af779056
Merge pull request #80635 from marsam/fix-bazel-darwin
bazel: fix build on darwin
2020-02-22 08:52:58 +01:00
Mario Rodas
572a6672d0
bazel-buildtools: add marsam to maintainers 2020-02-20 04:21:00 -05:00
Mario Rodas
d1ee615f1c
bazel: fix linker flags for darwin 2020-02-20 04:20:00 -05:00
Mario Rodas
3dd0593020
bazel-buildtools: 0.29.0 -> 1.0.0 2020-02-20 04:20:00 -05:00
Mario Rodas
2e651faa3c
bazel-remote: 2020-01-29 -> 1.0.0 2020-02-14 04:20:00 -05:00
Uri Baghin
10d1a04b02 bazel-deps: remove 2020-02-04 12:35:47 +11:00
Uri Baghin
3dc9c1b885 bazel-remote: 2019-01-12 -> 2020-01-29 2020-02-04 02:26:15 +01:00
Danju Visvanathan
0a6551f48c bazel: 1.2.1 -> 2.0.0 (#76851)
* bazel: 1.2.1 -> 2.0.0

* .
2020-01-07 17:24:54 +01:00
Guillaume Bouchard
4fdea7312e bazel: bazelRC path set by a patch
In bazel source code change in the future, patch will fail and we'll
detect the regression sooner.
2019-12-05 11:45:36 +01:00
Guillaume Bouchard
1ce0375b2f bazel: close #70911 by conditionally loading system wide configuration
Some system may setup global informations (such as bazel cache location)
in /etc/bazel.bazelrc
2019-12-05 11:17:13 +01:00
Guillaume Bouchard
0cffa85d57 bazel: remove wrapProgram and move it to system configuration
This way, custom configurations are all at the same place. Also, user
may override these settings using the command line.
2019-12-05 11:16:47 +01:00
Guillaume Bouchard
5b9e350fd4 bazel: move configuration file to a proper nix store entry
Easier to read and maintain
2019-12-05 11:02:37 +01:00
Guillaume Bouchard
c0a6fc4a56 bazel: add file and zip in the test runner env
`file` and `zip` are needed for some bazel test and by default the test
runner take these binaries from the current `PATH` which may not contain
them
2019-12-04 12:59:32 +01:00
Guillaume Bouchard
20752ba4f7 bazel: improve strict action env context
- Bazel strict action env set a default PATH to
`/bin/:/usr/bin:/usr/local/bin`. This was previously changed to disable
this behavior to improve hermeticity. However the previous change was
only removing `/bin:/usr/bin`, keeping `/usr/local/bin`, this commit
also remove this entry.
2019-12-04 12:59:32 +01:00
Wael M. Nasreddine
97656e9589
bazel: 1.2.0 -> 1.2.1 2019-11-27 15:36:24 -08:00
Wael M. Nasreddine
48478a1b6e
bazel: 1.1.0 -> 1.2.0 2019-11-25 11:19:14 -08:00
Profpatsch
fbd06addb3 bazel: exclude tests.shebang from running on darwin 2019-10-24 12:16:20 +02:00
Danju Visvanathan
76af684141 bazel: 1.0 -> 1.1 2019-10-22 14:18:12 +11:00
Florian Klink
0fd1df74be bazel_0_4: remove
bazel_0_4 fails to build since 2018-04-29, so clearly nobody is using
it.
2019-10-14 18:33:17 +02:00
Andreas Herrmann
1f3187c1b2 bazel: Comment on python versions. 2019-10-11 21:44:28 +02:00
Andreas Herrmann
1987d86007 bazel: shebang-test: Test for all bin/env ...
Fail on any form of `bin/env ...` shebang.
2019-10-11 21:44:28 +02:00
Andreas Herrmann
f6572b4e64 bazel: patch #!/usr/bin/env bash
To point to the custom bash instead of `/nix/store.../bin/env bash`.
2019-10-11 21:44:28 +02:00
Andreas Herrmann
d132d47199 bazel: shebang-test: pass bazel dir in Nix 2019-10-11 21:44:28 +02:00
Andreas Herrmann
7429acdea1 bazel: Test that all shebangs are patched correctly 2019-10-11 21:44:28 +02:00
Florian Klink
a0380cbfe9 bazel: fix build on macosx 2019-10-11 21:41:23 +02:00
Guillaume Bouchard
7e5b2e74b7 bazel: 0.29 -> 1.0 2019-10-11 21:41:23 +02:00
Uri Baghin
b8ab4451b5 bazel-buildtools: 0.28.0 -> 0.29.0 2019-09-11 15:17:07 +10:00
Vladimír Čunát
4aad2947f8
Merge branch 'master' into staging-next 2019-09-04 11:00:56 +02:00
Guillaume Bouchard
67904dccbb bazel: 0.28.1 -> 0.29.0
- Upgraded dependencies
  - dependencies script upgraded to take into account new WORKSPACE
    rules
- Tests now depends on the `distdir`

Runtime bazel now also depends on the `distdir` setting which appears
in the global configuration file. This increases the bazel closure
size by 85 MO for stuffs which can normally be downloaded at runtime
by bazel. However, any invocation of `buildBazelPackage` (such as in
`bazel-watcher`) may fail in nix sandbox if theses files are not
available at runtime.

If this overhead is too important, we may later evolve to a finer
grained solution, where buildBazelPackage declares the list of
necessary dependencies.
2019-09-03 13:12:53 +02:00
Frederik Rietdijk
ad1d58c622 Merge staging-next into staging 2019-08-31 10:04:20 +02:00
Frederik Rietdijk
fc74ba8291 Merge master into staging-next 2019-08-31 09:50:38 +02:00