21765a1407
This is just going to be a grab bag of things which do TVL-specific things to Gerrit, whether that be exposing new Prolog predicates or, as I intend to do as the first thing, expose Buildkite builds as checks. Change-Id: Iaeab987a1fdbd078b85e274691c986489903bf3a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2872 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
33 lines
709 B
Nix
33 lines
709 B
Nix
{ depot, pkgs, lib, ... }:
|
|
|
|
let
|
|
classPath = lib.concatStringsSep ":" [
|
|
"${depot.third_party.gerrit}/share/api/extension-api_deploy.jar"
|
|
];
|
|
in
|
|
pkgs.stdenvNoCC.mkDerivation rec {
|
|
name = "${pname}-${version}.jar";
|
|
pname = "gerrit-tvl";
|
|
version = "0.0.1";
|
|
|
|
src = ./.;
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
jdk
|
|
];
|
|
|
|
buildPhase = ''
|
|
mkdir $NIX_BUILD_TOP/build
|
|
|
|
# Build Java components.
|
|
export JAVAC="javac -cp ${classPath} -d $NIX_BUILD_TOP/build --release 11"
|
|
$JAVAC ./HttpModule.java
|
|
|
|
# Install static files.
|
|
cp -R static $NIX_BUILD_TOP/build/static
|
|
'';
|
|
|
|
installPhase = ''
|
|
jar --create --file $out --manifest $src/MANIFEST.MF -C $NIX_BUILD_TOP/build .
|
|
'';
|
|
}
|