nixpkgs/pkgs/development/libraries/java/lombok/default.nix
Robert Scott 3b6bc4b69c treewide: set sourceProvenance for packages containing downloaded jars
these are the easily identifiable cases and will not be comprehensive
2022-06-04 19:47:57 +01:00

34 lines
955 B
Nix

{ lib, stdenv, fetchurl, makeWrapper, jdk }:
stdenv.mkDerivation rec {
pname = "lombok";
version = "1.18.22";
src = fetchurl {
url = "https://projectlombok.org/downloads/lombok-${version}.jar";
sha256 = "sha256-7O8VgUEdeoLMBCgWZ+4LrF18ClqudM/DhDA5bJHDGDE=";
};
nativeBuildInputs = [ makeWrapper ];
outputs = [ "out" "bin" ];
buildCommand = ''
mkdir -p $out/share/java
cp $src $out/share/java/lombok.jar
makeWrapper ${jdk}/bin/java $bin/bin/lombok \
--add-flags "-cp ${jdk}/lib/openjdk/lib/tools.jar:$out/share/java/lombok.jar" \
--add-flags lombok.launch.Main
'';
meta = {
description = "A library that can write a lot of boilerplate for your Java project";
platforms = lib.platforms.all;
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.mit;
homepage = "https://projectlombok.org/";
maintainers = [ lib.maintainers.CrystalGamma ];
};
}