@@ -8,30 +8,38 @@ Examples will be created in the "examples" directory that should be cut-n-pasted
8
8
(and soon your MODULE.bazel).
9
9
10
10
The intent of this work is to:
11
- * offer a traditional WORKSPACE and newer bzlmod capability
12
- * re-home slamdev's work in making binaries available,
13
- * address the wider array of jq binaries now produced in a release,
14
- * adapt to the new naming schema, and
15
- * offer a fallback of building JQ if a release is not available or the user so chooses
16
11
12
+ - offer a traditional WORKSPACE and newer bzlmod capability
13
+ - re-home slamdev's work in making binaries available,
14
+ - address the wider array of jq binaries now produced in a release,
15
+ - adapt to the new naming schema, and
16
+ - offer a fallback of building JQ if a release is not available or the user so chooses
17
17
18
18
## Installation
19
19
20
20
### Traditional WORKSPACE
21
21
22
- (soon)
23
-
24
- Goal is something as simple as Slamdev's work:
25
22
``` starlark
26
23
load(" @bazel_tools//tools/build_defs/repo:http.bzl" , " http_archive" )
27
24
28
- http_archive( name = " rules_jq" , ... )
25
+ http_archive(
26
+ name = " rules_jq" ,
27
+ sha256 = " 52771b5f7fb5017b0f5a3816b46624d2b9a336ddc178b261de988d969cd329d8" ,
28
+ url = " https://github.com/jqlang/bazel_rules_jq/releases/download/0.0.1/bazel_rules_jq-v0.0.1.tar.gz" ,
29
+ )
30
+
31
+ load(" @rules_jq//jq:repositories.bzl" , " jq_register_toolchains" , " rules_jq_dependencies" )
29
32
30
- load(" @rules_jq//some_file.bzl" , " jq_register_toolchains" , " rules_jq_dependencies" )
31
33
rules_jq_dependencies()
32
- jq_register_toolchains(name = " jq" )
34
+
35
+ jq_register_toolchains(
36
+ name = " jq" ,
37
+ jq_version = " 1.6" ,
38
+ )
33
39
```
34
- (resulting in a @jq //: jq binary or similar)
40
+
41
+ The resulting JQ binary cannot be directly called, but can be used via ` jq_eval() `
42
+ (see example/eval) or as a Makefile-style variable (see example/genrule)
35
43
36
44
### bzlmod Modular Format
37
45
0 commit comments