tvl-depot/third_party/gerrit_plugins/default.nix
Vincent Ambo 2b42afa800 chore(3p/gerrit_plugins): Build plugins separately in CI
Change-Id: I76aeaa879e43b1fd08440f60a4f320bb7b48c6ab
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2630
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2021-03-21 13:01:51 +00:00

37 lines
1.3 KiB
Nix

{ depot, pkgs, ... }@args:
let
inherit (import ./builder.nix args) buildGerritBazelPlugin;
in depot.nix.utils.drvTargets {
# https://gerrit.googlesource.com/plugins/owners
owners = buildGerritBazelPlugin rec {
name = "owners";
depsOutputHash = "sha256:14h39q37lg9bydjqnhr52jakqvrx97jfqfg03l35qyadw780pny2";
src = pkgs.fetchgit {
url = "https://gerrit.googlesource.com/plugins/owners";
rev = "17817c9e319073c03513f9d5177b6142b8fd567b";
sha256 = "sha256:1p089shybp50svckcq51d0hfisjvbggndmvmhh8pvzvi6w8n9d89";
deepClone = true;
leaveDotGit = true;
};
overlayPluginCmd = ''
chmod +w "$out" "$out/plugins/external_plugin_deps.bzl"
cp -R "${src}/owners" "$out/plugins/owners"
cp "${src}/external_plugin_deps.bzl" "$out/plugins/external_plugin_deps.bzl"
cp -R "${src}/owners-common" "$out/owners-common"
'';
};
# https://gerrit.googlesource.com/plugins/checks
checks = buildGerritBazelPlugin {
name = "checks";
depsOutputHash = "sha256:1s4ldzny9f8vpp96sff8zy2kigz3hi560ikrgyp5630ffrc8affq";
src = pkgs.fetchgit {
url = "https://gerrit.googlesource.com/plugins/checks";
rev = "ab49a63f5c159bda42d9ad1bdb9286bede6c5de4";
sha256 = "0ghhmzkfmpn0xc6imvxgsk2wqckxm5g62h0k3bymyl7r48blmrn2";
deepClone = true;
leaveDotGit = true;
};
};
}