2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenvNoCC,
|
|
|
|
fetchurl,
|
|
|
|
jre,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
let
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.9.22";
|
2024-04-21 15:54:59 +00:00
|
|
|
versionSnakeCase = builtins.replaceStrings [ "." ] [ "_" ] version;
|
|
|
|
in
|
|
|
|
stdenvNoCC.mkDerivation {
|
2020-09-25 04:45:31 +00:00
|
|
|
pname = "aspectj";
|
2024-04-21 15:54:59 +00:00
|
|
|
inherit version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
__structuredAttrs = true;
|
|
|
|
|
|
|
|
src = fetchurl {
|
2020-09-25 04:45:31 +00:00
|
|
|
url = "https://github.com/eclipse/org.aspectj/releases/download/V${versionSnakeCase}/aspectj-${version}.jar";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-kQsWu/rS7Qf7Fcg5VZ+QhggvK69aUVD3HCh0aJ2qhfw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +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
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://www.eclipse.org/aspectj/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A seamless aspect-oriented extension to the Java programming language";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.epl10;
|
2024-04-21 15:54:59 +00:00
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|