Most of the ecosystem has moved to this formatter, and many people configured their editors to autoformat it with this formatter. Closes: https://git.snix.dev/snix/snix/issues/62 Change-Id: Icf39e7836c91fc2ae49fbe22a40a639105bfb0bd Reviewed-on: https://cl.snix.dev/c/snix/+/30671 Reviewed-by: Florian Klink <flokli@flokli.de> Tested-by: besadii Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
39 lines
711 B
Nix
39 lines
711 B
Nix
{
|
|
depot,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
{ gerrit }:
|
|
|
|
let
|
|
classPath = lib.concatStringsSep ":" [
|
|
"${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 .
|
|
'';
|
|
}
|