From 6591b76532e8fafc7b11209f2d8a75fb882f3b8c Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Mon, 8 Jul 2024 20:50:14 +0100 Subject: [PATCH] Add notes on how to use the dev shell setup --- .gitignore | 2 ++ README.md | 19 ++++++++++++++++++- gerrit/default.nix | 6 ++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9956b30..84b1fa9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ # SPDX-License-Identifier: MIT result* +.*.sw[a-z] +*~ diff --git a/README.md b/README.md index 505c4b3..45da434 100644 --- a/README.md +++ b/README.md @@ -46,10 +46,27 @@ nix build '.#plugins.code-owners' ## Building everything at once -Everything in the tree can be built at once using the `ci` expressiong: +Everything in the tree can be built at once using the `ci` expression: ``` nix-build -A ci # or nix build '.#ci' ``` + +## Development environment + +A development shell, containing enough stuff to build Gerrit on NixOS without too much faff is available: + +``` +nix-shell +# note that nix develop is currently broken +``` + +You can then build/test/etc inside a Gerrit Git checkout: + +``` +cd ~/src/gerrit +bazel build //:release +java -jar bazel-bin/release.war +``` diff --git a/gerrit/default.nix b/gerrit/default.nix index 002b5d5..d356ae2 100644 --- a/gerrit/default.nix +++ b/gerrit/default.nix @@ -59,6 +59,12 @@ in unzip ]; + shellHook = '' + bazelFlagsArray+=( + '--javacopt="-XepDisableAllChecks"' + ) + ''; + prePatch = '' rm .bazelversion