summary refs log tree commit diff
path: root/pkgs/build-support/build-bazel-package
Commit message (Collapse)AuthorAge
* buildBazelPackage: add support for bazel run targetsGaetan Lepage2023-08-02
|
* Revert "Update JAX"Nick Cao2023-08-01
|
* buildBazelPackage: add support for bazel run targetsGaetan Lepage2023-07-20
|
* bazel_5: 5.4.0->5.4.1Dmitry Ivankov2023-05-10
| | | | | | | | Also update the updater script. https://github.com/bazelbuild/bazel/releases/tag/5.4.1 - [X] recalculate fetchAttrs digest for packages built with bazel_5
* buildBazelPackage: never append to fFetchAttrs.installPhasesternenseemann2023-04-26
| | | | | | | | In f8ee061247b365a98322c102c5bfd900395a826c, the fallback installPhase if fFetchAttrs.installPhase is not provided, became dynamically computed. Due to operator precedence this had the side effect of appending to fFetchAttrs.installPhase if it is provided, breaking custom installPhases altogether.
* buildBazelPackage: fix difference between linux and darwin depsUri Baghin2023-04-06
|
* buildBazelPackage: allow buildAttrs and fetchAttrs to override inherited attrsUri Baghin2023-04-05
|
* buildBazelPackage: support multiple targetsUri Baghin2023-04-05
|
* treewide: use optionalStringFelix Buehler2023-02-13
|
* buildBazelPackage: make bazel explicitUri Baghin2023-01-24
|
* buildBazelPackage: optionally run bazel tests in checkPhaseYves-Stan Le Cornec2022-10-03
| | | Tests from the bazelTestTargets argument will be run before the build. The new bazelTestFlags argument can be used to pass additional flags to this phase.
* buildBazelPackage: run in batch mode to avoid requiring loopback networkingDmitry Kalinkin2022-09-11
|
* buildBazelPackage: allow custom impureEnvVarsAaron Jheng2022-07-04
|
* buildBazelPackage: Pass --curses=no for terse logsMike Purvis2021-12-04
|
* buildBazelPackage: set fetchConfigured default to trueLuke Granger-Brown2021-06-07
|
* buildBazelPackage: don't fail if the marker file doesn't existLuke Granger-Brown2021-06-06
| | | | | | This was the intent of my previous change, but it didn't quite work because the pipeline still exits false even if the file doesn't exist. Oops.
* Merge pull request #114853 from lourkeur/fix-string-escapingtaku02021-03-03
|\ | | | | nixos/kresd, nixos/dokuwiki, tests/fpm, build-bazel-package, libcutl: fix string escaping
| * build-bazel-package: fix string escaping kvtb2020-12-31
| | | | | | \@ has no effect in single quoted strings
* | buildBazelPackage: only rewrite relevant symlinksLuke Granger-Brown2021-01-13
|/
* buildBazelPackage: build name from pname/versionMatthieu Coudron2020-10-28
| | | | and updated bazel-remote accordingly.
* build-bazel-package: add dontAddBazelOpts argMatthew Bauer2020-08-28
| | | | | | | | This adds an option to skip adding --copt and --linkopt to Bazel flags. In some cases, Bazel doesn’t like these flags, like when a custom toolchain is being used (as opposed to the builtin one. The compiler can still get the dependencies since it is invoked through gcc wrapper and picks up the NIX_CFLAGS_COMPILE / NIX_LDFLAGS.
* buildBazelPackage: add "fetchConfigured" for fetching only things required ↵Luke Granger-Brown2020-07-17
| | | | | | | | | | | | | | | | | | for the build "bazel fetch" will, by default, fetch everything that _might_ be used, including things that will later be discarded due to the way the build is configured. Concretely, this means that for some builds of Java packages, this will avoid failures where the builder tries to retrieve the JDK from /usr/share/java (or equivalent). This also means that for most packages we can fetch _fewer_ dependencies, since the standard tree pruning for artifacts to fetch will take effect. fetchConfigured is disabled by default since it changes the fetch hashes of tensorflow/tensorflow2 (since it ends up fetching less).
* build-bazel-package: pass proxy env varsMatthew Bauer2020-05-09
|
* build-bazel-package: switch hash mode to “flat”Matthew Bauer2020-05-09
| | | | | | | | | 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.
* build-bazel-package: fix linkopt flagsMatthew Bauer2020-04-10
| | | | | | These values were incorrect. We need to use NIX_LDFLAGS, not NIX_LD_FLAGS. Also need to prefix all flags with -Wl, for GCC to accept it.
* buildBazelPackage: prime fixed output derivationsAndreas Rammhold2020-03-03
| | | | | | | | | | | | All bazel fixed output derivations should be specific to the bazel version that was used to generate them. There is not guarantee that the build will still succeed or reproduces (without the cached fixed output) if the fetch phase wasn't rerun with a different bazel version. In the past bazel had been bumped but not all those packages that have fixed outputs from bazel builds. This lead to compiling and somewhat working TF versions that couldn't be reproduced without the cached fixed outputs.
* tensorflow: 1.15.0 -> 1.15.1Michael Lingelbach2020-03-02
| | | | | | * Apply glibc 2.3 patch * build tensorflow with bazel_1 * Bump openssl version to 1.1
* bazel-deps: removeUri Baghin2020-02-04
|
* bazel-remote: 2019-01-12 -> 2020-01-29Uri Baghin2020-02-04
|
* buildBazelPackage: set $USER environment variable (#74538)Florian Klink2019-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | tensorflow assumes $USER to be set to something, otherwise it complains like this: ``` FATAL: $USER is not set, and unable to look up name of current user: (error: 0): Success Traceback (most recent call last): File "./configure.py", line 1602, in <module> main() File "./configure.py", line 1399, in main _TF_MAX_BAZEL_VERSION) File "./configure.py", line 478, in check_bazel_version ['bazel', '--batch', '--bazelrc=/dev/null', 'version']) File "./configure.py", line 156, in run_shell output = subprocess.check_output(cmd) File "/nix/store/drr8qcgiccfc5by09r5zc30flgwh1mbx-python3-3.7.5/lib/python3.7/subprocess.py", line 411, in check_output **kwargs).stdout File "/nix/store/drr8qcgiccfc5by09r5zc30flgwh1mbx-python3-3.7.5/lib/python3.7/subprocess.py", line 512, in run output=stdout, stderr=stderr) ``` Spotted while changing the hash of its fixed-output derivation on purpose. We could also set this in the tensorflow-specific part, but very likely, other programs will fail as well.
* buildBazelPackage: also set the SSL_CERT_FILE environment variableAndrew Dunham2019-11-28
|
* buildBazelPackage: allow specifying whether to remove rules_ccAndrew Dunham2019-11-27
|
* buildBazelPackage: remove rules_ccNikolay Amiantov2019-10-02
| | | | It's a new builtin dependency from Bazel 0.29.
* buildBazelPackage: remove top-level symlinksNikolay Amiantov2019-08-19
| | | | | | | They always can be regenerated during the actual build, and they are sometimes random, e.g in Tensorflow; platforms -> NIX_BUILD_TOP/tmp/install/35282f5123611afa742331368e9ae529/_embedded_binaries/platforms
* buildBazelPackage: add flags for build and fetchTimo Kaufmann2019-07-31
| | | | They sometimes take separate flags.
* buildBazelPackage: clear markersNikolay Amiantov2019-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out markers are non-deterministic after all and even our patching still doesn't solve this problem completely. For example (tensorflow deps, this is a complete diff so actual dependencies don't differ): 30509c30509 < bc527ff00916b15caee38793bca8f294c748df4a256de55c5199281be0489e73 result/@bazel_skylib.marker --- > 4e0303e815c78df1e43d4b88dfe65e73046e0c6157fb10aa9a4e8b910113cd9c result/@bazel_skylib.marker 31045c31045 < fa13d04b2316214c3b4008b52546c2d5b633e006f6f019d597bb3f9745bacf7b result/@bazel_toolchains.marker --- > b36174bf5535e5157801b6de30c35ee03a03fe57766306393c3d65dd65cbebf4 result/@bazel_toolchains.marker 31144c31144 < b0ce4a3ac29ac22528336dd3a54b5b7af9ecc43bef2a2630713c1981a5cbbb51 result/@build_bazel_rules_swift.marker --- > 7492528068ec4f8e7ace2ecf8f933ec4e1b2235bd7426ce6f70177919f1cd05e result/@build_bazel_rules_swift.marker 36245c36245 < be2993536a8233d63251b664caf35b1e7cd57d194ab2a39a293876c232d6bbd0 result/@io_bazel_rules_closure.marker --- > b6655cc3f2c78525e5a724d8a4e93b1e7f09f1e09fc817d231109e7f39103e88 result/@io_bazel_rules_closure.marker 36329c36329 < 087bc674c9509dfe157400d111db4a13eeb45fc76aeccd490cee9aad6771ecad result/@io_bazel_rules_docker.marker --- > f920ec07315ec71e800b05cd22b2a341c0a80807c6e335ee81739b13c532b422 result/@io_bazel_rules_docker.marker 79544d79543 < 85893a05a817036c61f6cd9f8247757baa1654f473c494ce4fc5253c2bbd2790 result/@platforms.marker And here's an example of differences: $ cat result-a/@bazel_skylib.marker 7dc7472d37424ba5ec6a5532765bc911 $MANAGED cat result-b/@bazel_skylib.marker a8f3f577798201157128e8e9934c4705 $MANAGED Instead of trying to patch these markers further we now completely clear them. Nix hacks for ignoring markers are restored and expanded so that we don't even attempt to parse the marker.
* buildBazelPackage: autodetect nix toolchain instead of Xcode on Darwin (#65308)Wael Nasreddine2019-07-25
| | | | | | | | | | * buildBazelPackage: autodetect nix toolchain instead of Xcode on Darwin * do not export the variables outside of Darwin * remove unecessary parens * move comment within the darwin check
* buildBazelPackage: cleanup hacks and enforce them for all buildsNikolay Amiantov2019-07-17
| | | | | | | | | Timestamp verification skip is no longer needed (not sure why). Generally we better off always using the environment hack for all packages because that ensures all NIX_* flags are correctly applied. One possible improvement in future is to filter only NIX_* variables to passthru in Bazel.
* buildBazelPackage: fix preConfigure without dependenciesTimo Kaufmann2019-06-28
|
* bzildBazelPackage: fix fetch with no markersTimo Kaufmann2019-06-28
| | | | | | | Previously the installPhase of the fixed ouput derivation would fail for a package that has no markers, since `sed` would complain about having no input files. If we use `find` instead of bash globs, that problem goes away.
* buildBazelPackage: disable multithreaded fetchingTimo Kaufmann2019-06-20
| | | | To work around https://github.com/bazelbuild/bazel/issues/6502.
* buildBazelPackage: fix directory symlink handlingTimo Kaufmann2019-06-20
| | | | | | | | | | The previous behaviour would work fine as long as `symlink` is a link to a file. If is a link to a directory though, the new `ln` wouldn't overwrite it but would create a new link *in that directory* (with the name of the link source). Instead, we can precompute the target location, then first remove the symlink and write the new one in its place.
* bazel-remote: init at 2019-01-12Uri Baghin2019-03-11
|
* buildBazelPackage: autodetect nix toolchain instead of Xcode one on macOS ↵Uri Baghin2019-02-19
| | | | (#56033)
* bazel-deps: 2018-11-01 -> 2019-02-01Uri Baghin2019-02-01
|
* bazel-watcher: init at 0.5.0Wael M. Nasreddine2018-09-29
|
* build-bazel-package: remove any .git, .svn and .hg from externalWael M. Nasreddine2018-09-29
|
* build-bazel-package: prefix bazel with the USER variableWael M. Nasreddine2018-09-29
| | | | | | | | | Bazel computes the default value of output_user_root before parsing the flag[0]. The computation of the default value involves getting the $USER from the environment. I don't have that variable when building with sandbox enabled. [0]: https://github.com/bazelbuild/bazel/blob/9323c57607d37f9c949b60e293b573584906da46/src/main/cpp/startup_options.cc#L123-L124
* bazel-deps: init at 2018-05-31 (#43018)Uri Baghin2018-07-09
|
* buildBazelPackage: initNikolay Amiantov2018-02-20
A separate function for building Bazel-bazed packages. Internally it splits the build into two phases, fetching and building. Users are expected to provide `fetchArgs.sha256` -- checksum of fetched dependencies. Local dependencies should be removed in `fetchArgs.preInstall`. Overall `fetchArgs` and `buildArgs` can be used to add specific steps to fetch and build.