mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
Merge pull request #300346 from wegank/aspectj-refactor
aspectj: refactor
This commit is contained in:
commit
c0d2398ba6
|
@ -1,28 +0,0 @@
|
||||||
if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
|
|
||||||
source $stdenv/setup
|
|
||||||
|
|
||||||
export JAVA_HOME=$jre
|
|
||||||
|
|
||||||
cat >> props <<EOF
|
|
||||||
output.dir=$out
|
|
||||||
context.javaPath=$jre
|
|
||||||
EOF
|
|
||||||
|
|
||||||
mkdir -p $out
|
|
||||||
$jre/bin/java -jar $src -text props
|
|
||||||
|
|
||||||
echo "Removing files at top level"
|
|
||||||
for file in $out/*
|
|
||||||
do
|
|
||||||
if test -f $file ; then
|
|
||||||
rm $file
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
cat >> $out/bin/aj-runtime-env <<EOF
|
|
||||||
#! $SHELL
|
|
||||||
|
|
||||||
export CLASSPATH=$CLASSPATH:.:$out/lib/aspectjrt.jar
|
|
||||||
EOF
|
|
||||||
|
|
||||||
chmod u+x $out/bin/aj-runtime-env
|
|
|
@ -1,25 +1,56 @@
|
||||||
{lib, stdenv, fetchurl, jre}:
|
{
|
||||||
|
lib,
|
||||||
|
stdenvNoCC,
|
||||||
|
fetchurl,
|
||||||
|
jre,
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
pname = "aspectj";
|
|
||||||
version = "1.9.21.2";
|
version = "1.9.21.2";
|
||||||
builder = ./builder.sh;
|
versionSnakeCase = builtins.replaceStrings [ "." ] [ "_" ] version;
|
||||||
|
in
|
||||||
|
stdenvNoCC.mkDerivation {
|
||||||
|
pname = "aspectj";
|
||||||
|
inherit version;
|
||||||
|
|
||||||
src = let
|
__structuredAttrs = true;
|
||||||
versionSnakeCase = builtins.replaceStrings ["."] ["_"] version;
|
|
||||||
in fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/eclipse/org.aspectj/releases/download/V${versionSnakeCase}/aspectj-${version}.jar";
|
url = "https://github.com/eclipse/org.aspectj/releases/download/V${versionSnakeCase}/aspectj-${version}.jar";
|
||||||
sha256 = "sha256-wqQtyopS03zX+GJme5YZwWiACqO4GAYFr3XAjzqSFnQ=";
|
hash = "sha256-wqQtyopS03zX+GJme5YZwWiACqO4GAYFr3XAjzqSFnQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit jre;
|
dontUnpack = true;
|
||||||
buildInputs = [jre];
|
|
||||||
|
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 = {
|
meta = {
|
||||||
homepage = "https://www.eclipse.org/aspectj/";
|
homepage = "https://www.eclipse.org/aspectj/";
|
||||||
description = "A seamless aspect-oriented extension to the Java programming language";
|
description = "A seamless aspect-oriented extension to the Java programming language";
|
||||||
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
|
||||||
platforms = lib.platforms.unix;
|
|
||||||
license = lib.licenses.epl10;
|
license = lib.licenses.epl10;
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue