diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/README.template.md | 55 | ||||
-rw-r--r-- | etc/defaults/CC/TARGETS | 3 | ||||
-rw-r--r-- | etc/defaults/CC/auto/TARGETS | 1 | ||||
-rw-r--r-- | etc/defaults/CC/proto/TARGETS | 14 | ||||
-rw-r--r-- | etc/defaults/CC/test/TARGETS | 1 | ||||
-rw-r--r-- | etc/defaults/shell/test/TARGETS | 1 | ||||
-rwxr-xr-x | etc/generate-doc.sh | 73 | ||||
-rwxr-xr-x | etc/generate-repos.sh | 25 | ||||
-rw-r--r-- | etc/imports/gtest.TARGETS | 6 | ||||
-rw-r--r-- | etc/imports/libs.TARGETS | 3 | ||||
-rw-r--r-- | etc/imports/rules.TARGETS | 1 | ||||
-rwxr-xr-x | etc/json-format.py | 72 | ||||
-rw-r--r-- | etc/repos.json | 480 | ||||
-rw-r--r-- | etc/repos.template.json | 46 |
14 files changed, 781 insertions, 0 deletions
diff --git a/etc/README.template.md b/etc/README.template.md new file mode 100644 index 0000000..98fed9a --- /dev/null +++ b/etc/README.template.md @@ -0,0 +1,55 @@ +# C/C++ rules for the `just` build system + +A collection of rules for building C/C++ libraries and binaries. + +## How to use this Repository + +There are two ways to import this repository. You can generate your +`repos.json` from a template (`repos.template.json`) by importing +the `rules-cc` repository with the tool `just-import-git` + +~~~sh +$ just-import-git -C repos.template.json --as rules-cc -b master https://github.com/just-buildsystem/rules-cc > repos.json +~~~ + +Importing this way will also pull in `protoc` and `grpc_cpp_plugin` +as a dependency for generating bindings for proto dependencies, if +this feature is used. + +Alternatively, the `rules-cc` repository can be added manually to +your `repos.json`. + +~~~json +... + , "rules-cc": + { "repository": + { "type": "git" + , "branch": "master" + , "commit": "2ea50063460a3e11dfcbb71651540c0d61fddc1a" + , "repository": "https://github.com/just-buildsystem/rules-cc" + , "subdir": "rules" + } + } +... +~~~ + +Importing this way, `protoc` and `grpc_cpp_plugin` will be taken +from the host system. To change the binary names or to bring your +own proto toolchain, add a corresponding `target_root` layer (and +provide the needed binding, if your target files refer to other +reposistories containing the toolchain). + +## Consume and being consumed by CMake Libraries + +For interoperability with CMake projects, see + +- [consume CMake libraries](./doc/consume-cmake-libraries.org) +- [being consumed by CMake](./doc/being-consumed-by-cmake.org) + +## Rule Documentation + +In this documentation, the standard configuration variables +`"AR"`, `"CC"`, `"CXX"`, `"CFLAGS"`, `"CXXFLAGS"`,`"LDFLAGS"`, +`"ADD_CFLAGS"`, `"ADD_CXXFLAGS"`, `"ADD_LDFLAGS"`, `"ENV"`, +`"BUILD_POSITION_INDEPENDENT"` are ommitted. + diff --git a/etc/defaults/CC/TARGETS b/etc/defaults/CC/TARGETS new file mode 100644 index 0000000..6e095cc --- /dev/null +++ b/etc/defaults/CC/TARGETS @@ -0,0 +1,3 @@ +{ "defaults": + {"type": ["CC", "defaults"], "base": [["@", "base", "CC", "defaults"]]} +} diff --git a/etc/defaults/CC/auto/TARGETS b/etc/defaults/CC/auto/TARGETS new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/etc/defaults/CC/auto/TARGETS @@ -0,0 +1 @@ +{} diff --git a/etc/defaults/CC/proto/TARGETS b/etc/defaults/CC/proto/TARGETS new file mode 100644 index 0000000..95ae1b0 --- /dev/null +++ b/etc/defaults/CC/proto/TARGETS @@ -0,0 +1,14 @@ +{ "defaults": + { "type": ["CC/proto", "defaults"] + , "PROTOC": ["bin/protoc"] + , "deps": [["@", "protoc", "", "libprotobuf"]] + , "toolchain": [["@", "protoc", "", "toolchain"]] + } +, "service defaults": + { "type": ["CC/proto", "defaults"] + , "base": ["defaults"] + , "GRPC_PLUGIN": ["grpc_cpp_plugin"] + , "deps": [["@", "grpc", "", "grpc++"]] + , "toolchain": [["@", "grpc", "", "grpc_cpp_plugin"]] + } +} diff --git a/etc/defaults/CC/test/TARGETS b/etc/defaults/CC/test/TARGETS new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/etc/defaults/CC/test/TARGETS @@ -0,0 +1 @@ +{} diff --git a/etc/defaults/shell/test/TARGETS b/etc/defaults/shell/test/TARGETS new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/etc/defaults/shell/test/TARGETS @@ -0,0 +1 @@ +{} diff --git a/etc/generate-doc.sh b/etc/generate-doc.sh new file mode 100755 index 0000000..01b90ce --- /dev/null +++ b/etc/generate-doc.sh @@ -0,0 +1,73 @@ +#!/bin/sh +# Copyright 2022 Huawei Cloud Computing Technology Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +readonly ROOT=$(readlink -f $(dirname $0)/..) + +: ${OUTFILE:=README.md} + +doc2md() { + local MAIN="$1" + local MODULE="$2" + local RULE="$3" + + local RULE_DOC="$(just-mr --main "$MAIN" describe --rule --json "$MODULE" "$RULE")" + local DOC="$(echo "$RULE_DOC" | jq -r '.doc')" + local FIELD_DOC="$(echo "$RULE_DOC" | jq -r '.field_doc')" + local CONFIG_DOC="$(echo "$RULE_DOC" | jq -r '.config_doc | delpaths([["AR"], ["CC"], ["CXX"], ["CFLAGS"], ["CXXFLAGS"],["LDFLAGS"], ["ADD_CFLAGS"], ["ADD_CXXFLAGS"], ["ADD_LDFLAGS"], ["ENV"], ["BUILD_POSITION_INDEPENDENT"]])')" + + echo "### Rule \`[\"$MODULE\", \"$RULE\"]\`" + echo + echo "$DOC" \ + | jq -r '[.[] as $v | if ($v == "") then "\n\n" else $v end] | join(" ")' \ + | sed 's/\("[^"]*"\|\[[^]]*\]\|{[^}]*}\)/`\1`/g' + echo + echo "| Field | Description |" + echo "| ----- | ----------- |" + echo "$FIELD_DOC" \ + | jq -r 'keys_unsorted[] as $k | "| \"\($k)\" | \(.[$k] | join(" ")) |"' \ + | sed 's/\("[^"]*"\|\[[^]]*\]\|{[^}]*}\)/`\1`/g' + echo + if [ "$(echo "$CONFIG_DOC" | jq -r 'length')" -gt 0 ] + then + echo "| Config variable | Description |" + echo "| --------------- | ----------- |" + echo "$CONFIG_DOC" \ + | jq -r 'keys_unsorted[] as $k | "| \"\($k)\" | \(.[$k] | join(" ")) |"' \ + | sed 's/\("[^"]*"\|\[[^]]*\]\|{[^}]*}\)/`\1`/g' + echo + fi +} + +rm -f "$OUTFILE" +( cat "$ROOT/etc/README.template.md" + doc2md rules CC binary + doc2md rules CC library + doc2md rules CC/prebuilt library + doc2md rules CC install-with-deps + doc2md rules CC/test test + doc2md rules CC defaults + doc2md rules CC/proto defaults + doc2md rules shell/test script + doc2md rules CC/foreign/cmake library + doc2md rules CC/foreign/cmake data + doc2md rules CC/foreign/make library + doc2md rules CC/foreign/make data + doc2md rules proto library + doc2md rules data staged + doc2md rules patch file + doc2md rules CC/auto config +) >> "$OUTFILE" diff --git a/etc/generate-repos.sh b/etc/generate-repos.sh new file mode 100755 index 0000000..ee8d510 --- /dev/null +++ b/etc/generate-repos.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# Copyright 2022 Huawei Cloud Computing Technology Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +readonly ROOT=$(readlink -f $(dirname $0)/..) + +: ${BRANCH:=v1.1.0-alpha+20230419} +: ${OUTFILE:=${ROOT}/etc/repos.json} + +just-import-git --as just -C ${ROOT}/etc/repos.template.json \ + -b ${BRANCH} https://github.com/just-buildsystem/justbuild \ + | ${ROOT}/etc/json-format.py > ${OUTFILE} diff --git a/etc/imports/gtest.TARGETS b/etc/imports/gtest.TARGETS new file mode 100644 index 0000000..a9b2217 --- /dev/null +++ b/etc/imports/gtest.TARGETS @@ -0,0 +1,6 @@ +{ "tree": + { "type": "install" + , "dirs": [[["TREE", null, "."], "googletest"]] + , "tainted": ["test"] + } +} diff --git a/etc/imports/libs.TARGETS b/etc/imports/libs.TARGETS new file mode 100644 index 0000000..f455122 --- /dev/null +++ b/etc/imports/libs.TARGETS @@ -0,0 +1,3 @@ +{ "tree": + {"type": "tree", "deps": [["@", "gtest", "", "tree"]], "tainted": ["test"]} +} diff --git a/etc/imports/rules.TARGETS b/etc/imports/rules.TARGETS new file mode 100644 index 0000000..73e1ff5 --- /dev/null +++ b/etc/imports/rules.TARGETS @@ -0,0 +1 @@ +{"tree": {"type": "install", "dirs": [[["TREE", null, "."], "rules"]], "tainted": ["test"]}} diff --git a/etc/json-format.py b/etc/json-format.py new file mode 100755 index 0000000..058d098 --- /dev/null +++ b/etc/json-format.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python3 + +# Copyright (C) 2021-2022 Klaus Aehlig. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import json +import sys + +def is_simple(entry): + if isinstance(entry, list): + return len(entry) == 0 + if isinstance(entry, dict): + return len(entry) == 0 + return True + +def is_short(entry, indent): + return len(json.dumps(entry)) + indent < 80 + +def hdumps(entry, *, _current_indent=0): + if is_short(entry, _current_indent): + return json.dumps(entry) + if isinstance(entry, list) and entry: + result = "[ " + hdumps(entry[0], _current_indent=_current_indent+2) + for x in entry[1:]: + result += "\n" + " " * _current_indent + ", " + result += hdumps(x, _current_indent=_current_indent+2) + result += "\n" + " " * _current_indent + "]" + return result + if isinstance(entry, dict) and entry: + result = "{ " + is_first = True + for k in entry.keys(): + if not is_first: + result += "\n" + " " * _current_indent + ", " + result += json.dumps(k) + ":" + if is_simple(entry[k]): + result += " " + json.dumps(entry[k]) + elif is_short(entry[k], _current_indent + len(json.dumps(k)) + 4): + result += " " + json.dumps(entry[k]) + else: + result += "\n" + " " * _current_indent + " " + result += hdumps(entry[k], _current_indent=_current_indent+2) + is_first = False + result += "\n" + " " * _current_indent + "}" + return result + return json.dumps(entry) + +if __name__ == "__main__": + data = json.load(sys.stdin) + print(hdumps(data)) diff --git a/etc/repos.json b/etc/repos.json new file mode 100644 index 0000000..e7205f3 --- /dev/null +++ b/etc/repos.json @@ -0,0 +1,480 @@ +{ "main": "rules with bundled tools" +, "repositories": + { "rules": {"repository": {"type": "file", "path": "rules"}} + , "rules with bundled tools": + { "repository": "rules" + , "target_root": "defaults" + , "rule_root": "rules" + , "bindings": + { "base": "just/rules" + , "protoc": "just/protobuf" + , "grpc": "just/com_github_grpc_grpc" + } + } + , "defaults": {"repository": {"type": "file", "path": "etc/defaults"}} + , "tests": + { "repository": {"type": "file", "path": "tests"} + , "bindings": + { "test-just": "just" + , "test-rules": "test-rules" + , "test-libs": "test-libs" + } + } + , "imports": {"repository": {"type": "file", "path": "etc/imports"}} + , "test-rules": + { "repository": {"type": "file", "path": "rules"} + , "target_root": "imports" + , "target_file_name": "rules.TARGETS" + } + , "test-libs": + { "repository": "imports" + , "target_file_name": "libs.TARGETS" + , "bindings": {"gtest": "gtest"} + } + , "gtest": + { "repository": + { "type": "archive" + , "fetch": "https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz" + , "content": "cbd19f97df3ab86b174520cd850d238617c156e0" + , "sha256": "ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363" + , "subdir": "googletest-1.13.0" + } + , "target_root": "imports" + , "target_file_name": "gtest.TARGETS" + } + , "just": + { "repository": + { "type": "git" + , "repository": "https://github.com/just-buildsystem/justbuild" + , "branch": "v1.1.0-alpha+20230419" + , "commit": "728f9e810ed3b49a73243b6002e1117a86bad437" + } + , "bindings": + { "rules": "just/rules-just" + , "just-distfiles": "just/just-distfiles" + , "gsl-lite": "just/gsl-lite" + , "cli11": "just/cli11" + , "json": "just/json" + , "fmt": "just/fmt" + , "ssl": "just/ssl" + , "grpc": "just/com_github_grpc_grpc" + , "googleapis": "just/google_apis" + , "bazel_remote_apis": "just/bazel_remote_apis" + , "libgit2": "just/com_github_libgit2_libgit2" + , "catch2": "just/catch2" + , "protoc": "just/protobuf" + , "libcurl": "just/com_github_curl_curl" + , "bzip2": "just/bzip2" + , "libarchive": "just/com_github_libarchive_libarchive" + } + } + , "just/bazel_remote_apis": + { "repository": + { "type": "archive" + , "content": "b5deb95d544f03f1918cc9d611c7904b8173befa" + , "fetch": "https://github.com/bazelbuild/remote-apis/archive/v2.0.0.tar.gz" + , "sha256": "79204ed1fa385c03b5235f65b25ced6ac51cf4b00e45e1157beca6a28bdb8043" + , "sha512": "7465f4726a9cc263352f6f0ec5b065c53e2ad787611740e1a458331858bdf28d53d69ba3db3d83fbf4a578229a413ac230886b5fcd33ab76425c61b1f08ef3b3" + , "subdir": "remote-apis-2.0.0" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.bazel_remote_apis" + , "bindings": {"rules": "just/rules", "google_apis": "just/google_apis"} + } + , "just/bzip2": + { "repository": + { "type": "archive" + , "content": "f9d91f2012aedeedcfd3bd918124ca11f0160373" + , "fetch": "https://github.com/libarchive/bzip2/archive/refs/tags/bzip2-1.0.8.tar.gz" + , "sha256": "db106b740252669664fd8f3a1c69fe7f689d5cd4b132f82ba82b9afba27627df" + , "sha512": "596d1b304f1f2d64b020d04845db10a2330c7f614a9fd0b5344afff65877d2141b3fcaa43d9e2dbc2f6a7929a1dab07df54d3d4bd69678b53906472958c7b80c" + , "subdir": "bzip2-bzip2-1.0.8" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.bzip2" + , "bindings": {"rules": "just/rules-bzip2"} + } + , "just/catch2": + { "repository": + { "type": "archive" + , "content": "fd54249eeb20894ece50696a84ef674a0052b6da" + , "fetch": "https://github.com/catchorg/Catch2/archive/refs/tags/v3.3.2.tar.gz" + , "sha256": "8361907f4d9bff3ae7c1edb027f813659f793053c99b67837a0c0375f065bae2" + , "sha512": "3d0c5666509a19be54ea0c48a3c8e1c4a951a2d991a7c9f7fe6d326661464538f1ab9dc573b1b2647f49fb6bef45bbd866142a4ce0fba38545ad182b8d55f61f" + , "subdir": "Catch2-3.3.2" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.catch2" + , "bindings": {"rules": "just/rules"} + } + , "just/cli11": + { "repository": + { "type": "archive" + , "content": "f2eee8c3fe04347bbb65cbb555c83d4c8d6a7034" + , "fetch": "https://github.com/CLIUtils/CLI11/archive/refs/tags/v2.3.2.tar.gz" + , "sha256": "aac0ab42108131ac5d3344a9db0fdf25c4db652296641955720a4fbe52334e22" + , "sha512": "f48b289d52034c47b90db58c035a123b464bed488cf31bcdbe10a692214a5c05e62b99d6fb7c4b065f42df862ecf3813f11dd533b3697939d761e99d2b89c2ec" + , "subdir": "CLI11-2.3.2/" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.cli11" + , "bindings": {"rules": "just/rules"} + } + , "just/com_github_cares_cares": + { "repository": + { "type": "archive" + , "content": "229bb6835455e73a550e4dc44f8ddac22dc34aa7" + , "fetch": "https://github.com/c-ares/c-ares/archive/e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz" + , "sha256": "e8c2751ddc70fed9dc6f999acd92e232d5846f009ee1674f8aee81f19b2b915a" + , "sha512": "c213e2a15e5e8adfc3036d66537d4c9ca6b5685b1d0e7a57fe1abe44eebb99d5e0cb42f6a9259fd8ca75d1a4833dbc1009e2025e633b871b902b02f172fcc9bd" + , "subdir": "c-ares-e982924acee7f7313b4baa4ee5ec000c5e373c30" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.cares" + , "bindings": {"rules": "just/rules", "grpc": "just/com_github_grpc_grpc"} + } + , "just/com_github_curl_curl": + { "repository": + { "type": "archive" + , "content": "540b4de2edfa015b894ad86d51b33a55f451ac99" + , "fetch": "https://github.com/curl/curl/releases/download/curl-8_0_1/curl-8.0.1.tar.gz" + , "sha256": "5fd29000a4089934f121eff456101f0a5d09e2a3e89da1d714adf06c4be887cb" + , "sha512": "87d945e65176613c6296f8b130bd6c5355e3ca3c62ee4010edd481950cad9760482fd3be8a84e51501c118c29ebc284b8f87c49b06f9d248e9da5819fda38f8f" + , "subdir": "curl-8.0.1" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.curl" + , "bindings": + { "rules": "just/rules-curl" + , "zlib": "just/zlib" + , "ssl": "just/ssl" + , "cares": "just/com_github_cares_cares" + } + } + , "just/com_github_grpc_grpc": + { "repository": + { "type": "archive" + , "content": "23f49d3b842f2e916c861d5150e4b7d048084888" + , "fetch": "https://github.com/grpc/grpc/archive/v1.31.0.tar.gz" + , "sha256": "1236514199d3deb111a6dd7f6092f67617cd2b147f7eda7adbafccea95de7381" + , "sha512": "fc68079a70c39d66cb6f028e775418a90c61694406ddfa413298ec33de2f56e26eb47e10a53fc616e32c254c84e335598dc22598a95c223698ebf8eca60f7cea" + , "subdir": "grpc-1.31.0" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.grpc" + , "rule_file_name": "RULES.grpc" + , "bindings": + { "rules": "just/rules-grpc" + , "protobuf": "just/protobuf" + , "libssl": "just/ssl" + , "absl": "just/com_google_absl" + , "upb": "just/upb" + , "zlib": "just/zlib" + , "re2": "just/re2" + , "cares": "just/com_github_cares_cares" + } + } + , "just/com_github_libarchive_libarchive": + { "repository": + { "type": "archive" + , "content": "2dafab016d6338086925fd04dbaa6a18bd24cb31" + , "fetch": "https://github.com/libarchive/libarchive/releases/download/v3.6.2/libarchive-3.6.2.tar.gz" + , "sha256": "ba6d02f15ba04aba9c23fd5f236bb234eab9d5209e95d1c4df85c44d5f19b9b3" + , "sha512": "24e476465054a29a2d48adf3c197a171b5361fa5038729a1f14d578c6701424de4e5dd6a2b20a6b697969ab43bdd8afc1585f8de0465c266f455d7eaa19e5048" + , "subdir": "libarchive-3.6.2" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.archive" + , "bindings": + { "rules": "just/rules-archive" + , "zlib": "just/zlib" + , "ssl": "just/ssl" + , "bzip2": "just/bzip2" + } + } + , "just/com_github_libgit2_libgit2": + { "repository": + { "type": "archive" + , "content": "0c7c845401ae9ad63c5617da6df7e84145b699a0" + , "fetch": "https://github.com/libgit2/libgit2/archive/refs/tags/v1.5.2.tar.gz" + , "sha256": "57638ac0e319078f56a7e17570be754515e5b1276d3750904b4214c92e8fa196" + , "sha512": "0de5e82953482bf57e9cd221406581a12c6acfbeeea0cebbb9b701d288804ec085b7c0902ba1f04ad7cdaaead9d472be21ffe8d730050db5c77101a93448fb3a" + , "subdir": "libgit2-1.5.2" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.git2" + , "bindings": + {"rules": "just/rules-git2", "zlib": "just/zlib", "ssl": "just/ssl"} + } + , "just/com_google_absl": + { "repository": + { "type": "archive" + , "content": "d9ba22c59e08577e0986c6d483f33c9fa7b2e104" + , "fetch": "https://github.com/abseil/abseil-cpp/archive/df3ea785d8c30a9503321a3d35ee7d35808f190d.tar.gz" + , "sha256": "f368a8476f4e2e0eccf8a7318b98dafbe30b2600f4e3cf52636e5eb145aba06a" + , "sha512": "b429758c37749d3d5c5c220fe0dc00fa0e193b406545484095339b25674c4a3bb7850b76dd1a370ed2006729bcbbbb1b438995b614e149c2290bdb10038c49d1" + , "subdir": "abseil-cpp-df3ea785d8c30a9503321a3d35ee7d35808f190d" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.absl" + , "bindings": {"rules": "just/rules-absl"} + } + , "just/fmt": + { "repository": + { "type": "zip" + , "content": "558d83d0fedb1f1ee3c3c4f1576d549cae7614ed" + , "fetch": "https://github.com/fmtlib/fmt/releases/download/9.1.0/fmt-9.1.0.zip" + , "sha256": "cceb4cb9366e18a5742128cb3524ce5f50e88b476f1e54737a47ffdf4df4c996" + , "sha512": "482d1ceaf042e97c66ff570babe9bd6f9cab7e4eec3dc56eb7d5e075b6b9b16f8eb333e96de9627fa33324d32b88d2aacebd0c34c3c706650eaa1729b0dd7fd6" + , "subdir": "fmt-9.1.0" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.fmt" + , "bindings": {"rules": "just/rules"} + } + , "just/google_apis": + { "repository": + { "type": "zip" + , "content": "8a1ca602cb7eb42094c853f0640489599962c2cc" + , "fetch": "https://github.com/googleapis/googleapis/archive/143084a2624b6591ee1f9d23e7f5241856642f4d.zip" + , "sha256": "7b6ea252f0b8fb5cd722f45feb83e115b689909bbb6a393a873b6cbad4ceae1d" + , "sha512": "319bd988d25877bc72ab7fad8309126268f88d987a64b9ffb7956bdd442938e02ec922251de933aba8d424559fd8dc43cf7954f6c865e3f863940c1e8f533c5a" + , "subdir": "googleapis-143084a2624b6591ee1f9d23e7f5241856642f4d" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.google_apis" + , "bindings": {"rules": "just/rules", "patches": "just/patches"} + } + , "just/gsl-lite": + { "repository": + { "type": "archive" + , "content": "6a2245941d8a713897f439c35512593683f6ad48" + , "fetch": "https://github.com/gsl-lite/gsl-lite/archive/v0.40.0.tar.gz" + , "sha256": "65af4ec8a1050dac4f1ca4622881bb02a9c3978a9baec289fb56e25412d6cac7" + , "sha512": "afd65009bf33f54cd1caf1988b725e618bee4f4f779825ae1df55017034c6fff75feaa737a358a7f5e690757637f4d281c2f22d06c39efb81dacd7d1949251df" + , "subdir": "gsl-lite-0.40.0/include/gsl" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.gsl" + , "bindings": {"rules": "just/rules"} + } + , "just/json": + { "repository": + { "type": "zip" + , "content": "a0cf5f0e098b6a8748eb1c106b0b1994b92fead9" + , "fetch": "https://github.com/nlohmann/json/releases/download/v3.11.2/include.zip" + , "sha256": "e5c7a9f49a16814be27e4ed0ee900ecd0092bfb7dbfca65b5a421b774dccaaed" + , "sha512": "99d9e6d588cabe8913a37437f86acb5d4b8b98bce12423e633c11c13b61e6c7f92ef8f9a4e991baa590329ee2b5c09ca9db9894bee1e54bdd68e8d09d83cc245" + , "subdir": "include/nlohmann" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.json" + , "bindings": {"rules": "just/rules"} + } + , "just/just-distfiles": + { "repository": + { "type": "distdir" + , "repositories": + [ "just/gsl-lite" + , "just/cli11" + , "just/json" + , "just/fmt" + , "just/ssl" + , "just/protobuf" + , "just/bazel_remote_apis" + , "just/google_apis" + , "just/upb" + , "just/com_google_absl" + , "just/zlib" + , "just/re2" + , "just/com_github_cares_cares" + , "just/com_github_grpc_grpc" + , "just/com_github_libgit2_libgit2" + ] + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.distfiles" + } + , "just/patches": + { "repository": + { "type": "git" + , "repository": "https://github.com/just-buildsystem/justbuild" + , "branch": "v1.1.0-alpha+20230419" + , "commit": "728f9e810ed3b49a73243b6002e1117a86bad437" + , "subdir": "etc/patches" + } + } + , "just/protobuf": + { "repository": + { "type": "zip" + , "content": "7af7165b585e4aed714555a747b6822376176ef4" + , "fetch": "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.12.4.zip" + , "sha256": "c5dc4cacbb303d5d0aa20c5cbb5cb88ef82ac61641c951cdf6b8e054184c5e22" + , "sha512": "11e7584f44994ed6e9745bf6cbbac791bb090615d362fb3bd9aa8ebc08504042303ff945007030274359e268f8d62e116eaba2bb4910431ea3f7845af23cc7c5" + , "subdir": "protobuf-3.12.4" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.protobuf" + , "bindings": {"rules": "just/rules-protobuf", "zlib": "just/zlib"} + } + , "just/re2": + { "repository": + { "type": "archive" + , "content": "987bf33d9e876431f4ab3c630ff08605f58b98a7" + , "fetch": "https://github.com/google/re2/archive/aecba11114cf1fac5497aeb844b6966106de3eb6.tar.gz" + , "sha256": "9f385e146410a8150b6f4cb1a57eab7ec806ced48d427554b1e754877ff26c3e" + , "sha512": "bbe972e3fd65da69e0d7ac0e0b025fb09ad894315cb6c0e1268fa296599274f9f7c2e771aa577b340c8fa9412d8539fe3db2171d0e9ab9714f3f10910a1d5529" + , "subdir": "re2-aecba11114cf1fac5497aeb844b6966106de3eb6" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.re2" + , "bindings": {"rules": "just/rules-re2"} + } + , "just/rules": + { "repository": + { "type": "git" + , "repository": "https://github.com/just-buildsystem/justbuild" + , "branch": "v1.1.0-alpha+20230419" + , "commit": "728f9e810ed3b49a73243b6002e1117a86bad437" + , "subdir": "rules" + } + , "target_root": "just/defaults" + , "rule_root": "just/rules" + } + , "just/rules-absl": + { "repository": "just/rules" + , "target_root": "just/defaults" + , "rule_root": "just/rules" + , "target_file_name": "TARGETS.absl" + , "bindings": {"base": "just/rules"} + } + , "just/rules-archive": + { "repository": "just/rules" + , "target_root": "just/defaults" + , "rule_root": "just/rules" + , "target_file_name": "TARGETS.archive" + , "bindings": {"base": "just/rules"} + } + , "just/rules-boringssl": + { "repository": "just/rules" + , "target_root": "just/defaults" + , "rule_root": "just/rules" + , "target_file_name": "TARGETS.boringssl" + , "bindings": {"base": "just/rules"} + } + , "just/rules-bzip2": + { "repository": "just/rules" + , "target_root": "just/defaults" + , "rule_root": "just/rules" + , "target_file_name": "TARGETS.bzip2" + , "bindings": {"base": "just/rules"} + } + , "just/rules-curl": + { "repository": "just/rules" + , "target_root": "just/defaults" + , "rule_root": "just/rules" + , "target_file_name": "TARGETS.curl" + , "bindings": {"base": "just/rules"} + } + , "just/rules-git2": + { "repository": "just/rules" + , "target_root": "just/defaults" + , "rule_root": "just/rules" + , "target_file_name": "TARGETS.git2" + , "bindings": {"base": "just/rules"} + } + , "just/rules-grpc": + { "repository": "just/rules" + , "target_root": "just/defaults" + , "rule_root": "just/rules" + , "target_file_name": "TARGETS.grpc" + , "bindings": {"base": "just/rules", "protoc": "just/protobuf"} + } + , "just/rules-just": + { "repository": "just/rules" + , "target_root": "just/defaults" + , "rule_root": "just/rules" + , "target_file_name": "TARGETS.just" + , "bindings": + { "base": "just/rules" + , "protoc": "just/protobuf" + , "grpc": "just/com_github_grpc_grpc" + } + } + , "just/rules-protobuf": + { "repository": "just/rules" + , "target_root": "just/defaults" + , "rule_root": "just/rules" + , "target_file_name": "TARGETS.protobuf" + , "bindings": + { "base": "just/rules" + , "protoc": "just/protobuf" + , "grpc": "just/com_github_grpc_grpc" + } + } + , "just/rules-re2": + { "repository": "just/rules" + , "target_root": "just/defaults" + , "rule_root": "just/rules" + , "target_file_name": "TARGETS.re2" + , "bindings": {"base": "just/rules"} + } + , "just/ssl": + { "repository": + { "type": "archive" + , "content": "cdf51ff27d78e1aceb7cc01d03f9a115826501be" + , "fetch": "https://github.com/google/boringssl/archive/e8a935e323510419e0b37638716f6df4dcbbe6f6.tar.gz" + , "sha256": "5bbb2bbddf5e4e5fefd02501f930436f3f45402152d7ea9f8f27916d5cf70157" + , "sha512": "c1cb6a94b967985e05c699ff73d1e6aebba27903d771c58008cedbbdead53eda33e112de10691af7471e823013afada466ea1abb420a3d55cfd8e2a4b09effed" + , "subdir": "boringssl-e8a935e323510419e0b37638716f6df4dcbbe6f6" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.boringssl" + , "bindings": {"rules": "just/rules-boringssl"} + } + , "just/upb": + { "repository": + { "type": "archive" + , "content": "a234f5d2ccff01ee0a36e016b482276c5078905d" + , "fetch": "https://github.com/protocolbuffers/upb/archive/92e63da73328d01b417cf26c2de7b0a27a0f83af.tar.gz" + , "sha256": "79f7de61203c4ee5e4fcb2f17c5f3338119d6eb94aca8bce05332d2c1cfee108" + , "sha512": "9121c15ba540dbee1e09896a42b88b8616616929c4e607dbbc2f8706a8119672f34a0e81968b1d1d62b532d22bda969a32d22755b086456d031e2689aec7f24f" + , "subdir": "upb-92e63da73328d01b417cf26c2de7b0a27a0f83af" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.upb" + , "bindings": {"rules": "just/rules"} + } + , "just/zlib": + { "repository": + { "type": "archive" + , "content": "c47b5e6e3db9dd9f5dfec2ba28428a0444d1c052" + , "fetch": "https://github.com/madler/zlib/archive/cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz" + , "sha256": "6d4d6640ca3121620995ee255945161821218752b551a1a180f4215f7d124d45" + , "sha512": "c6a9e08d7cb11ed90faf40335f5378ae92cf3d973edd96be40a5dd46e9b2ab5fa26acea666ee0d3e3c69e3c7d7d709702b82ace809e59972447386c9955cf280" + , "subdir": "zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f" + } + , "target_root": "just/import targets" + , "target_file_name": "TARGETS.zlib" + , "bindings": {"rules": "just/rules"} + } + , "just/defaults": + { "repository": + { "type": "git" + , "repository": "https://github.com/just-buildsystem/justbuild" + , "branch": "v1.1.0-alpha+20230419" + , "commit": "728f9e810ed3b49a73243b6002e1117a86bad437" + , "subdir": "etc/defaults" + } + } + , "just/import targets": + { "repository": + { "type": "git" + , "repository": "https://github.com/just-buildsystem/justbuild" + , "branch": "v1.1.0-alpha+20230419" + , "commit": "728f9e810ed3b49a73243b6002e1117a86bad437" + , "subdir": "etc/import" + } + } + } +} diff --git a/etc/repos.template.json b/etc/repos.template.json new file mode 100644 index 0000000..b18b665 --- /dev/null +++ b/etc/repos.template.json @@ -0,0 +1,46 @@ +{ "main": "rules with bundled tools" +, "repositories": + { "rules": {"repository": {"type": "file", "path": "rules"}} + , "rules with bundled tools": + { "repository": "rules" + , "target_root": "defaults" + , "rule_root": "rules" + , "bindings": + { "base": "just/rules" + , "protoc": "just/protobuf" + , "grpc": "just/com_github_grpc_grpc" + } + } + , "defaults": {"repository": {"type": "file", "path": "etc/defaults"}} + , "tests": + { "repository": {"type": "file", "path": "tests"} + , "bindings": + { "test-just": "just" + , "test-rules": "test-rules" + , "test-libs": "test-libs" + } + } + , "imports": {"repository": {"type": "file", "path": "etc/imports"}} + , "test-rules": + { "repository": {"type": "file", "path": "rules"} + , "target_root": "imports" + , "target_file_name": "rules.TARGETS" + } + , "test-libs": + { "repository": "imports" + , "target_file_name": "libs.TARGETS" + , "bindings": {"gtest": "gtest"} + } + , "gtest": + { "repository": + { "type": "archive" + , "fetch": "https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz" + , "content": "cbd19f97df3ab86b174520cd850d238617c156e0" + , "sha256": "ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363" + , "subdir": "googletest-1.13.0" + } + , "target_root": "imports" + , "target_file_name": "gtest.TARGETS" + } + } +} |