mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 11:40:45 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
57 lines
1.1 KiB
Nix
57 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
fetchurl,
|
|
jre,
|
|
}:
|
|
|
|
let
|
|
version = "1.9.22.1";
|
|
versionSnakeCase = builtins.replaceStrings [ "." ] [ "_" ] version;
|
|
in
|
|
stdenvNoCC.mkDerivation {
|
|
pname = "aspectj";
|
|
inherit version;
|
|
|
|
__structuredAttrs = true;
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/eclipse/org.aspectj/releases/download/V${versionSnakeCase}/aspectj-${version}.jar";
|
|
hash = "sha256-NIyYVhJIGXz+vNVoAQzYsDfmOYc4QrRzJGWeQjS4X0U=";
|
|
};
|
|
|
|
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
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://www.eclipse.org/aspectj/";
|
|
description = "Seamless aspect-oriented extension to the Java programming language";
|
|
license = lib.licenses.epl10;
|
|
platforms = lib.platforms.unix;
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
|
};
|
|
}
|