From 7c51a68ee5398cb8169715d37da6369226628d73 Mon Sep 17 00:00:00 2001 From: Alexei Drake Date: Wed, 1 Dec 2021 17:04:08 +0100 Subject: [PATCH] Add hopefully helpful readmes to examples --- examples/toolchains/cc/README.md | 17 +++++++++++++++++ examples/toolchains/go/README.md | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 examples/toolchains/cc/README.md create mode 100644 examples/toolchains/go/README.md diff --git a/examples/toolchains/cc/README.md b/examples/toolchains/cc/README.md new file mode 100644 index 000000000..d78b05a2d --- /dev/null +++ b/examples/toolchains/cc/README.md @@ -0,0 +1,17 @@ +C++ Toolchain Example +===================== + +This is an example C++ project that uses `rules_cc`. It should build and run both with or without Nix installed. + +# Usage + +To run the example with Nix, issue the following command: +``` +nix-shell --command 'bazel run :hello' +``` + +To run the example without Nix, make sure you have Bazel installed, and issue the following command: +``` +bazel run :hello +``` +Note that if this command is run on NixOS, it will still use Nix. :-) diff --git a/examples/toolchains/go/README.md b/examples/toolchains/go/README.md new file mode 100644 index 000000000..c6af07676 --- /dev/null +++ b/examples/toolchains/go/README.md @@ -0,0 +1,17 @@ +Go Toolchain Example +==================== + +This is an example Go project that uses `rules_go`. It should build and run both with or without Nix installed. + +# Usage + +To run the example with Nix, issue the following command: +``` +nix-shell --command 'bazel run :hello' +``` + +To run the example without Nix, make sure you have Bazel installed, and issue the following command: +``` +bazel run :hello +``` +Note that if this command is run on NixOS, it will still use Nix. :-)