···11-# The Bazel build tool
22-33-https://bazel.build/
44-55-The bazel tool requires regular maintenance, especially under darwin, so we created a maintainers team.
66-77-Please ping @NixOS/bazel in your github PR/issue to increase your chance of a quick turnaround, thanks!
···369369 # On Darwin, the last argument to gcc is coming up as an empty string. i.e: ''
370370 # This is breaking the build of any C target. This patch removes the last
371371 # argument if it's found to be an empty string.
372372- ../trim-last-argument-to-gcc-if-empty.patch
372372+ ./trim-last-argument-to-gcc-if-empty.patch
373373374374 # --experimental_strict_action_env (which may one day become the default
375375 # see bazelbuild/bazel#2574) hardcodes the default
···377377 # This is non hermetic on non-nixos systems. On NixOS, bazel cannot find the required binaries.
378378 # So we are replacing this bazel paths by defaultShellPath,
379379 # improving hermeticity and making it work in nixos.
380380- (replaceVars ../strict_action_env.patch {
380380+ (replaceVars ./strict_action_env.patch {
381381 strictActionEnvPatch = defaultShellPath;
382382 })
383383384384 # bazel reads its system bazelrc in /etc
385385 # override this path to a builtin one
386386- (replaceVars ../bazel_rc.patch {
386386+ (replaceVars ./bazel_rc.patch {
387387 bazelSystemBazelRCPath = bazelRC;
388388 })
389389 ]
···11-#!/usr/bin/env python3
22-import sys
33-import json
44-55-if len(sys.argv) == 1:
66- print("usage: ./this-script WORKSPACE", file=sys.stderr)
77- print("Takes the bazel WORKSPACE file and reads all archives into a json dict (by evaling it as python code)", file=sys.stderr)
88- print("Hail Eris.", file=sys.stderr)
99- sys.exit(1)
1010-1111-http_archives = []
1212-1313-# just the kw args are the dict { name, sha256, urls … }
1414-def http_archive(**kw):
1515- http_archives.append(kw)
1616-# like http_file
1717-def http_file(**kw):
1818- http_archives.append(kw)
1919-2020-# this is inverted from http_archive/http_file and bundles multiple archives
2121-def distdir_tar(**kw):
2222- for archive_name in kw['archives']:
2323- http_archives.append({
2424- "name": archive_name,
2525- "sha256": kw['sha256'][archive_name],
2626- "urls": kw['urls'][archive_name]
2727- })
2828-2929-# stubs for symbols we are not interested in
3030-# might need to be expanded if new bazel releases add symbols to the workspace
3131-def workspace(name): pass
3232-def load(*args): pass
3333-def bind(**kw): pass
3434-def list_source_repository(**kw): pass
3535-def new_local_repository(**kw): pass
3636-def local_repository(**kw): pass
3737-DOC_VERSIONS = []
3838-def stardoc_repositories(**kw): pass
3939-def skydoc_repositories(**kw): pass
4040-def rules_sass_dependencies(**kw): pass
4141-def node_repositories(**kw): pass
4242-def sass_repositories(**kw): pass
4343-def register_execution_platforms(*args): pass
4444-def rbe_autoconfig(*args, **kw): pass
4545-def rules_pkg_dependencies(*args, **kw): pass
4646-def winsdk_configure(*args, **kw): pass
4747-def register_local_rc_exe_toolchains(*args, **kw): pass
4848-def register_toolchains(*args, **kw): pass
4949-def debian_deps(): pass
5050-def grpc_deps(): pass
5151-def grpc_extra_deps(): pass
5252-def bazel_skylib_workspace(): pass
5353-5454-# execute the WORKSPACE like it was python code in this module,
5555-# using all the function stubs from above.
5656-with open(sys.argv[1]) as f:
5757- exec(f.read())
5858-5959-# transform to a dict with the names as keys
6060-d = { el['name']: el for el in http_archives }
6161-6262-print(json.dumps(d, sort_keys=True, indent=4))