diff options
Diffstat (limited to 'third_party/gerrit_plugins/builder.nix')
-rw-r--r-- | third_party/gerrit_plugins/builder.nix | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/third_party/gerrit_plugins/builder.nix b/third_party/gerrit_plugins/builder.nix index ff1754e088f3..0b6501801cd1 100644 --- a/third_party/gerrit_plugins/builder.nix +++ b/third_party/gerrit_plugins/builder.nix @@ -1,33 +1,35 @@ { depot, pkgs, ... }: { - buildGerritBazelPlugin = { - name, - src, - depsOutputHash, - overlayPluginCmd ? '' - cp -R "${src}" "$out/plugins/${name}" - '', - postPatch ? "", - }: ((depot.third_party.gerrit.override { - name = "${name}.jar"; + buildGerritBazelPlugin = + { name + , src + , depsOutputHash + , overlayPluginCmd ? '' + cp -R "${src}" "$out/plugins/${name}" + '' + , postPatch ? "" + , + }: ((depot.third_party.gerrit.override { + name = "${name}.jar"; - src = pkgs.runCommandLocal "${name}-src" {} '' - cp -R "${depot.third_party.gerrit.src}" "$out" - chmod +w "$out/plugins" - ${overlayPluginCmd} - ''; + src = pkgs.runCommandLocal "${name}-src" { } '' + cp -R "${depot.third_party.gerrit.src}" "$out" + chmod +w "$out/plugins" + ${overlayPluginCmd} + ''; - bazelTarget = "//plugins/${name}"; - }).overrideAttrs (super: { - deps = super.deps.overrideAttrs (superDeps: { - outputHash = depsOutputHash; - }); - installPhase = '' - cp "bazel-bin/plugins/${name}/${name}.jar" "$out" - ''; - postPatch = if super ? postPatch then '' - ${super.postPatch} - ${postPatch} - '' else postPatch; - })); + bazelTarget = "//plugins/${name}"; + }).overrideAttrs (super: { + deps = super.deps.overrideAttrs (superDeps: { + outputHash = depsOutputHash; + }); + installPhase = '' + cp "bazel-bin/plugins/${name}/${name}.jar" "$out" + ''; + postPatch = + if super ? postPatch then '' + ${super.postPatch} + ${postPatch} + '' else postPatch; + })); } |