2024-03-31 00:00:27 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenvNoCC,
|
|
|
|
fetchurl,
|
|
|
|
jre,
|
|
|
|
}:
|
2006-03-26 03:52:55 +00:00
|
|
|
|
2024-03-31 00:00:27 +00:00
|
|
|
let
|
2024-05-18 22:25:37 +00:00
|
|
|
version = "1.9.22.1";
|
2024-03-31 00:00:27 +00:00
|
|
|
versionSnakeCase = builtins.replaceStrings [ "." ] [ "_" ] version;
|
|
|
|
in
|
|
|
|
stdenvNoCC.mkDerivation {
|
|
|
|
pname = "aspectj";
|
|
|
|
inherit version;
|
2006-03-26 03:52:55 +00:00
|
|
|
|
2024-03-31 00:00:27 +00:00
|
|
|
__structuredAttrs = true;
|
|
|
|
|
|
|
|
src = fetchurl {
|
2020-08-24 21:00:00 +00:00
|
|
|
url = "https://github.com/eclipse/org.aspectj/releases/download/V${versionSnakeCase}/aspectj-${version}.jar";
|
2024-05-18 22:25:37 +00:00
|
|
|
hash = "sha256-NIyYVhJIGXz+vNVoAQzYsDfmOYc4QrRzJGWeQjS4X0U=";
|
2006-03-26 03:52:55 +00:00
|
|
|
};
|
|
|
|
|
2024-03-31 00:00:27 +00:00
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ jre ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
cat >> props <<EOF
|
|
|
|
output.dir=$out
|
|
|
|
context.javaPath=${jre}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
mkdir -p $out
|
|
|
|
java -jar $src -text props
|
|
|
|
|
|
|
|
cat >> $out/bin/aj-runtime-env <<EOF
|
|
|
|
#! ${stdenvNoCC.shell}
|
|
|
|
|
|
|
|
export CLASSPATH=$CLASSPATH:.:$out/lib/aspectjrt.jar
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod u+x $out/bin/aj-runtime-env
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2010-09-27 11:19:31 +00:00
|
|
|
|
|
|
|
meta = {
|
2023-01-21 21:41:12 +00:00
|
|
|
homepage = "https://www.eclipse.org/aspectj/";
|
2010-09-27 11:19:31 +00:00
|
|
|
description = "Seamless aspect-oriented extension to the Java programming language";
|
2021-01-22 11:25:31 +00:00
|
|
|
license = lib.licenses.epl10;
|
2024-03-31 00:00:27 +00:00
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
2010-09-27 11:19:31 +00:00
|
|
|
};
|
2006-03-26 03:52:55 +00:00
|
|
|
}
|