ivy build

This commit is contained in:
Some One 2025-09-06 15:36:10 +02:00
parent a88128d90a
commit 964e15fd5e
36 changed files with 805 additions and 9 deletions

24
ant/ant_1_6.nix Normal file
View File

@ -0,0 +1,24 @@
{stdenv, fetchzip, jdk6, ant_1_7}: stdenv.mkDerivation rec {
pname = "ant";
version = "1.6";
outJar = "lib/ant.jar";
src = fetchzip {
url = "https://archive.apache.org/dist/ant/source/apache-ant-1.6.0-src.tar.gz";
hash = "sha256-DLkzCsueJim9NdKbsbUwlfNK22PrdV6k4dc80qQGuU8=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
ant
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}

View File

@ -1,4 +1,4 @@
{stdenv, fetchzip, jdk6, junit, breakpointHook}: stdenv.mkDerivation rec {
{stdenv, fetchzip, jdk6, junit_4, breakpointHook}: stdenv.mkDerivation rec {
pname = "ant";
version = "1.7.0";
@ -11,7 +11,7 @@
buildInputs = [breakpointHook];
env = {
JAVA_HOME="${jdk6}";
CLASSPATH="${junit}/junit-4.1.jar";
CLASSPATH="${junit_4}/junit-4.1.jar";
};
buildPhase = ''

40
ant/ivy.nix Normal file
View File

@ -0,0 +1,40 @@
{stdenv, fetchFromGitHub, jdk6, ant_1_7, ivyDep, ivyDepHook, ant_1_6, commons-cli, commons-httpclient_3, oro, commons-vfs,
jsch_0_1_25, junit_3_8_2, commons-lang, xerces, xerces-api}: stdenv.mkDerivation rec {
pname = "ivy";
version = "2.0.0-beta2";
src = fetchFromGitHub {
owner = "apache";
repo = "ant-ivy";
#rev = "6325a4020fe653cadcdc4827c1a3aa5f5f075010";
rev = "refs/tags/" + version;
hash = "sha256-NnJug8pvkpMmkIe1B3Im/pGh6fkrqv3RIeVFRHq4bt4=";
};
patches = [./ivy.patch];
nativeBuildInputs = [jdk6 ant_1_7
(ivyDep ant_1_6 {})
(ivyDep commons-cli {})
(ivyDep commons-httpclient_3 {})
(ivyDep oro {})
(ivyDep commons-vfs {})
(ivyDep jsch_0_1_25 {})
(ivyDep junit_3_8_2 {})
(ivyDep commons-lang {})
(ivyDep xerces {})
(ivyDep xerces-api {})];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
ant jar
'';
installPhase = ''
mkdir $out
cp -r ./build/artifact/jars/ivy.jar $out/ivy.jar
'';
}

15
ant/ivy.patch Normal file
View File

@ -0,0 +1,15 @@
diff --git a/ivy.xml b/ivy.xml
index f7506e6..0b6ac40 100644
--- a/ivy.xml
+++ b/ivy.xml
@@ -40,8 +40,8 @@
</publications>
<dependencies>
<dependency org="ant" name="ant" rev="1.6" conf="default"/>
- <dependency org="commons-httpclient" name="commons-httpclient" rev="3.0" conf="default,httpclient->runtime,master" />
- <dependency org="commons-cli" name="commons-cli" rev="1.0" conf="default,standalone->runtime,master" />
+ <dependency org="commons-httpclient" name="commons-httpclient" rev="3.0" conf="default,httpclient->default" />
+ <dependency org="commons-cli" name="commons-cli" rev="1.0" conf="default,standalone->default" />
<dependency org="oro" name="oro" rev="2.0.8" conf="default,oro->default"/>
<dependency org="commons-vfs" name="commons-vfs" rev="1.0" conf="default,vfs->default" />
<dependency org="jsch" name="jsch" rev="0.1.25" conf="default,sftp->default" />

24
ant/ivyDep.nix Normal file
View File

@ -0,0 +1,24 @@
{stdenv, ivyDepHook}:
dep: {}:
stdenv.mkDerivation rec {
pname = "ivy_dep_${builtins.replaceStrings ["-"] [""] dep.pname}";
version = dep.version;
dontUnpack = true;
dontBuild = true;
#propagatedNativeBuildInputs = [];
buildInputs = [dep];
installPhase = ''
mkdir -p $out/nix-support
echo "export IVY_DEPS+=${pname}" >> $out/nix-support/setup-hook
echo "export IVY_NAME_${pname}=${dep.outName or dep.pname}" >> $out/nix-support/setup-hook
echo "export IVY_ORG_${pname}=${dep.org or dep.pname}" >> $out/nix-support/setup-hook
echo "export IVY_VERSION_${pname}=${dep.version}" >> $out/nix-support/setup-hook
echo "export IVY_SOURCE_${pname}=${dep}/${dep.outJar}" >> $out/nix-support/setup-hook
echo 'bash ${ivyDepHook.src}' >> $out/nix-support/setup-hook
echo "export IVY_DEPS=" >> $out/nix-support/setup-hook
'';
}

13
ant/ivyDepHook.nix Normal file
View File

@ -0,0 +1,13 @@
{stdenv, fetchFromGitHub}: stdenv.mkDerivation rec {
pname = "ivyDepHook";
version = "1.0";
src = ./ivyDepHook.sh;
dontUnpack = true;
installPhase = ''
mkdir -p $out/nix-support
cp $src $out/nix-support/setup-hook
'';
}

21
ant/ivyDepHook.sh Normal file
View File

@ -0,0 +1,21 @@
#echo "IVY DEP HOOK!!!"
#build/.ivy2/local/ant/ant/1.6/jars/ant.jar
: "${IVY_DEPS:=}"
for dep in $IVY_DEPS; do
nameVar="IVY_NAME_${dep}"
orgVar="IVY_ORG_${dep}"
versionVar="IVY_VERSION_${dep}"
sourceVar="IVY_SOURCE_${dep}"
name="${!nameVar}"
org="${!orgVar}"
version="${!versionVar}"
source="${!sourceVar}"
path="/build/.ivy2/local/$org/$name/$version/jars"
file="$path/$name.jar"
echo "Registering Ivy Dependency: $file -> $source"
mkdir -p $path
ln -s "$source" "$file"
done

24
ant/mavenDep.nix Normal file
View File

@ -0,0 +1,24 @@
{stdenv, mavenDepHook}:
dep: {}:
stdenv.mkDerivation rec {
pname = "maven_dep_${builtins.replaceStrings ["-"] [""] dep.pname}";
version = dep.version;
dontUnpack = true;
dontBuild = true;
#propagatedNativeBuildInputs = [];
buildInputs = [dep];
installPhase = ''
mkdir -p $out/nix-support
echo "export MAVEN_DEPS+=${pname}" >> $out/nix-support/setup-hook
echo "export MAVEN_NAME_${pname}=${dep.pname}" >> $out/nix-support/setup-hook
echo "export MAVEN_ORG_${pname}=${dep.org or dep.pname}" >> $out/nix-support/setup-hook
echo "export MAVEN_VERSION_${pname}=${dep.version}" >> $out/nix-support/setup-hook
echo "export MAVEN_SOURCE_${pname}=${dep}/${dep.outJar}" >> $out/nix-support/setup-hook
echo 'bash ${mavenDepHook.src}' >> $out/nix-support/setup-hook
echo "export MAVEN_DEPS=" >> $out/nix-support/setup-hook
'';
}

13
ant/mavenDepHook.nix Normal file
View File

@ -0,0 +1,13 @@
{stdenv, fetchFromGitHub}: stdenv.mkDerivation rec {
pname = "mavenDepHook";
version = "1.0";
src = ./mavenDepHook.sh;
dontUnpack = true;
installPhase = ''
mkdir -p $out/nix-support
cp $src $out/nix-support/setup-hook
'';
}

23
ant/mavenDepHook.sh Normal file
View File

@ -0,0 +1,23 @@
#echo "IVY DEP HOOK!!!"
#/build/.maven/repository/commons-logging/jars/commons-logging-1.0.4.jar
: "${MAVEN_DEPS:=}"
for dep in $MAVEN_DEPS; do
nameVar="MAVEN_NAME_${dep}"
orgVar="MAVEN_ORG_${dep}"
versionVar="MAVEN_VERSION_${dep}"
sourceVar="MAVEN_SOURCE_${dep}"
name="${!nameVar}"
org="${!orgVar}"
version="${!versionVar}"
source="${!sourceVar}"
path="/build/.maven/repository/$org/jars"
file="$path/$name-$version.jar"
echo "Registering Maven Dependency: $file -> $source"
mkdir -p $path
#ln -s "$source" "$file"
cp "$source" "$file"
chmod 777 "$file"
done

View File

@ -1,4 +1,4 @@
{stdenv, fetchFromGitHub, jdk6, ant_1_7_0}: stdenv.mkDerivation rec {
{stdenv, fetchFromGitHub, jdk6, ant_1_7, ivyDep, ivy, commons-cli, commons-httpclient_3, groovy}: stdenv.mkDerivation rec {
pname = "gradle";
version = "0.0.2";
@ -11,12 +11,20 @@
#patches = [./mysql.patch];
nativeBuildInputs = [jdk6 ant_1_7_0];
#buildInputs = [autoreconfHook ncurses breakpointHook];
nativeBuildInputs = [jdk6 ant_1_7
(ivyDep commons-cli {})
(ivyDep commons-httpclient_3 {})
(ivyDep groovy {})];
env = {
JAVA_HOME="${jdk6}";
};
configurePhase = ''
mkdir ./ivy
ln -s ${ivy}/ivy.jar ./ivy/ivy-2.0.0.beta2_20080305165542.jar
'';
buildPhase = ''
ant
#bash ./gradlew build

29
java/commons-cli.nix Normal file
View File

@ -0,0 +1,29 @@
{stdenv, fetchFromGitHub, jdk6, ant_1_7, commons-lang}: stdenv.mkDerivation rec {
pname = "commons-cli";
version = "1.0";
outJar = "commons-cli-1.0-beta-2-dev.jar";
src = fetchFromGitHub {
owner = "apache";
repo = pname;
rev = "CLI_1_0";
hash = "sha256-HwS1RdyGNuPZJoKWQX9X9KwNs013M1T5NBLSn4N9fKo=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
CLASSPATH="${commons-lang}/commons-lang-2.0.jar";
};
buildPhase = ''
mkdir ./lib
ant dist -Dnoget=true
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}

28
java/commons-codec.nix Normal file
View File

@ -0,0 +1,28 @@
{stdenv, fetchurl, fetchFromGitHub, jdk6, ant_1_7}: stdenv.mkDerivation rec {
pname = "commons-codec";
version = "1.3";
#outJar = "commons-cli-1.0-beta-2-dev.jar";
src = fetchFromGitHub {
owner = "apache";
repo = pname;
rev = "CODEC_1_3";
hash = "sha256-7nZvIXXDxZgSGrJ6exEarEXgWn6gkGq707XtQllz7GM=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
ln -s /build/source/LICENSE.txt /build/LICENSE
ant dist
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}

View File

@ -0,0 +1,29 @@
{stdenv, fetchFromGitHub, jdk6, ant_1_7}: stdenv.mkDerivation rec {
pname = "commons-collections";
version = "3.1";
outJar = "commons-collections-3.1.jar";
src = fetchFromGitHub {
owner = "apache";
repo = pname;
rev = "collections-3.1";
hash = "sha256-7Nv2zbhYkChp8h0f5BlYK3WGunhVyCbeH6m3hheWg8Y=";
};
patches = [./commons-collections.patch];
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
ant dist
'';
installPhase = ''
mkdir $out
cp -r ./build/bin/commons-collections-3.1/* $out/
'';
}

View File

@ -0,0 +1,13 @@
diff --git a/build.xml b/build.xml
index 87aab6d..f421ac4 100644
--- a/build.xml
+++ b/build.xml
@@ -489,7 +489,7 @@
<!-- ====================================================================== -->
- <target name="dist" depends="jar,testjar,javadoc,tf.validate,tf.jar,dist.bin,dist.src"
+ <target name="dist" depends="jar,javadoc,dist.bin,dist.src"
description="Create distribution folders">
</target>

View File

@ -0,0 +1,27 @@
{stdenv, fetchzip, jdk6, ant_1_7, commons-logging_1_0_4}: stdenv.mkDerivation rec {
pname = "commons-httpclient";
version = "2.0.2";
outJar = "commons-httpclient.jar";
src = fetchzip {
url = "https://archive.apache.org/dist/httpcomponents/commons-httpclient/2.0/source/commons-httpclient-2.0.2-src.tar.gz";
hash = "sha256-klzcXmhDaNFAxnrSV8fFERqg9SIgypsknqSXmCeweHw=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
CLASSPATH="${commons-logging_1_0_4}/commons-logging.jar";
};
buildPhase = ''
mkdir ./lib
ant dist
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}

View File

@ -0,0 +1,27 @@
{stdenv, fetchzip, jdk6, ant_1_7, commons-logging_1_1, commons-codec}: stdenv.mkDerivation rec {
pname = "commons-httpclient";
version = "3.0";
outJar = "commons-httpclient.jar";
src = fetchzip {
url = "https://archive.apache.org/dist/httpcomponents/commons-httpclient/3.0/source/commons-httpclient-3.0-src.zip";
hash = "sha256-MY9Tg/pX6efI3nmdbNs1r9U2aQaGxLcTytzg4IjmftA=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
CLASSPATH="${commons-logging_1_1}/commons-logging-1.1.jar:${commons-codec}/commons-codec-1.3.jar";
};
buildPhase = ''
mkdir ./lib
ant dist
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}

27
java/commons-lang.nix Normal file
View File

@ -0,0 +1,27 @@
{stdenv, fetchFromGitHub, jdk6, ant_1_7}: stdenv.mkDerivation rec {
pname = "commons-lang";
version = "2.0";
outJar = "commons-lang-2.0.jar";
src = fetchFromGitHub {
owner = "apache";
repo = pname;
rev = "LANG_2_0";
hash = "sha256-MMJG9xB5e51qo2iELH2qwuee0bEofHS5NVb0qgY5A5k=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
ant dist
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}

View File

@ -0,0 +1,27 @@
{stdenv, fetchurl, fetchFromGitHub, jdk6, ant_1_7}: stdenv.mkDerivation rec {
pname = "commons-logging";
version = "1.0.4";
outJar = "commons-logging.jar";
src = fetchFromGitHub {
owner = "apache";
repo = pname;
rev = "LOGGING_1_0_4";
hash = "sha256-U5pZjKrMHC02wXAqnB+DwtK91TI3+wfPaaB/UwVfixQ=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
ant dist
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}

View File

@ -0,0 +1,34 @@
{stdenv, fetchurl, fetchFromGitHub, jdk6, ant_1_7, junit_3_8_1}: stdenv.mkDerivation rec {
pname = "commons-logging";
version = "1.1.0";
#outJar = "commons-cli-1.0-beta-2-dev.jar";
src = fetchFromGitHub {
owner = "apache";
repo = pname;
rev = "LOGGING_1_1_0";
hash = "sha256-1QtqPd7Yu4S6wgZSbh9ob7iaWQ59gWnG/ukRzAdDzOE=";
};
servletApi = fetchurl {
url = "https://repo1.maven.org/maven2/servletapi/servletapi/2.3/servletapi-2.3.jar";
hash = "sha256-hHi5AtCBXtBm24YPsUzF1ARUjUtjSKuTC0YnD83eumg=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
CLASSPATH="${junit_3_8_1}/junit.jar";
};
buildPhase = ''
ln -s ${servletApi} ./servletapi-2.3.jar
ant dist
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}

28
java/commons-net.nix Normal file
View File

@ -0,0 +1,28 @@
{stdenv, fetchFromGitHub, jdk6, ant_1_7, oro}: stdenv.mkDerivation rec {
pname = "commons-net";
version = "1.4.1";
outJar = "commons-net-1.4.1.jar";
src = fetchFromGitHub {
owner = "apache";
repo = pname;
rev = "NET_1_4_1";
hash = "sha256-6J/HJq74DSkG3Gg44BmSiMSTJm4+ka4fgKFv5CAPWkM=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
CLASSPATH="${oro}/jakarta-oro-2.0.8.jar";
};
buildPhase = ''
ant dist
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}

31
java/commons-vfs.nix Normal file
View File

@ -0,0 +1,31 @@
{stdenv, fetchzip, jdk6, ant_1_7, mavenDep, commons-logging_1_0_4, commons-httpclient_2_0_2, commons-collections,
commons-net, jsch_0_1_23}: stdenv.mkDerivation rec {
pname = "commons-vfs";
version = "1.0";
outJar = "commons-vfs-1.0.jar";
src = fetchzip {
url = "https://archive.apache.org/dist/commons/vfs/source/commons-vfs-1.0-src.tar.gz";
hash = "sha256-EkXkS/huf5vcrOVVYQD0f25qxFiAFG3ZOGoJpWf4NMI=";
};
nativeBuildInputs = [jdk6 ant_1_7
(mavenDep commons-logging_1_0_4 {})
(mavenDep commons-httpclient_2_0_2 {})
(mavenDep commons-collections {})
(mavenDep commons-net {})
(mavenDep jsch_0_1_23 {})];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
ant dist
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}

30
java/groovy.nix Normal file
View File

@ -0,0 +1,30 @@
{stdenv, fetchFromGitHub, jdk6, ant_1_7}: stdenv.mkDerivation rec {
pname = "groovy";
version = "1.5.5";
outJar = "commons-collections-3.1.jar";
src = fetchFromGitHub {
owner = "apache";
repo = pname;
rev = "8f649e5e022c48294c534e39d398ca2d5e10ca8b";
hash = "sha256-19KMYk0wbUveSkmMwH28AcwNnxUq9Xbu5OdYj2XJ4ZM=";
};
#patches = [./commons-collections.patch];
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
cd groovy
ant
'';
installPhase = ''
mkdir $out
cp -r ./build/bin/commons-collections-3.1/* $out/
'';
}

28
java/jsch_0_1_23.nix Normal file
View File

@ -0,0 +1,28 @@
{stdenv, fetchzip, jdk6, ant_1_7}: stdenv.mkDerivation rec {
pname = "jsch";
version = "0.1.23";
outJar = "lib/jsch-0.1.23.jar";
org = "com.jcraft";
src = fetchzip {
url = "https://master.dl.sourceforge.net/project/jsch/jsch/0.1.23/jsch-0.1.23.zip";
hash = "sha256-W4aIGyO+XLhOTLThFsLyPf+v0MGxERL1uCKe/f/C3g8=";
};
patches = [./jsch_0_1_23.patch];
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
ant
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}

22
java/jsch_0_1_23.patch Normal file
View File

@ -0,0 +1,22 @@
diff --git a/build.xml b/build.xml
index 6a30ba1..e219cc2 100644
--- a/build.xml
+++ b/build.xml
@@ -5,7 +5,7 @@ sshd server and use port forwarding, X11 forwarding, file transfer, etc., and
you can integrate its functionality into your own Java programs
</description>
<!-- set global properties for this build -->
- <property name="version" location="0.1.3"/>
+ <property name="version" location="0.1.23"/>
<property name="src" location="src"/>
<property name="exasrc" location="examples"/>
<property name="build" location="build"/>
@@ -42,7 +42,7 @@ you can integrate its functionality into your own Java programs
<mkdir dir="${dist}/lib"/>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
- <jar jarfile="${dist}/lib/jsch-${DSTAMP}.jar" basedir="${build}"/>
+ <jar jarfile="${dist}/lib/jsch-0.1.23.jar" basedir="${build}"/>
</target>
<target name="examples"

27
java/jsch_0_1_25.nix Normal file
View File

@ -0,0 +1,27 @@
{stdenv, fetchzip, jdk6, ant_1_7}: stdenv.mkDerivation rec {
pname = "jsch";
version = "0.1.25";
outJar = "lib/jsch-0.1.25.jar";
src = fetchzip {
url = "https://master.dl.sourceforge.net/project/jsch/jsch/0.1.25/jsch-0.1.25.zip";
hash = "sha256-F9fMkEDimPTk8vvtww6jgK/ECtG6M9IzRS7FDzlukQQ=";
};
patches = [./jsch_0_1_25.patch];
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
ant
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}

22
java/jsch_0_1_25.patch Normal file
View File

@ -0,0 +1,22 @@
diff --git a/build.xml b/build.xml
index 6a30ba1..e219cc2 100644
--- a/build.xml
+++ b/build.xml
@@ -5,7 +5,7 @@ sshd server and use port forwarding, X11 forwarding, file transfer, etc., and
you can integrate its functionality into your own Java programs
</description>
<!-- set global properties for this build -->
- <property name="version" location="0.1.3"/>
+ <property name="version" location="0.1.25"/>
<property name="src" location="src"/>
<property name="exasrc" location="examples"/>
<property name="build" location="build"/>
@@ -42,7 +42,7 @@ you can integrate its functionality into your own Java programs
<mkdir dir="${dist}/lib"/>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
- <jar jarfile="${dist}/lib/jsch-${DSTAMP}.jar" basedir="${build}"/>
+ <jar jarfile="${dist}/lib/jsch-0.1.25.jar" basedir="${build}"/>
</target>
<target name="examples"

25
java/junit_3_8_1.nix Normal file
View File

@ -0,0 +1,25 @@
{stdenv, fetchFromGitHub, jdk6, ant_1_7}: stdenv.mkDerivation rec {
pname = "junit";
version = "3.8.1";
src = fetchFromGitHub {
owner = "junit-team";
repo = pname;
rev = "38f9586a3f645d9ccc1bce6fc80ac7093a01f795";
hash = "sha256-Vs7EFT+2BLeXUJ7W652G8GYP6e+JBpeArpictomdrKs=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
ant
'';
installPhase = ''
mkdir $out
cp -r ./junit3.8.1/* $out/
'';
}

26
java/junit_3_8_2.nix Normal file
View File

@ -0,0 +1,26 @@
{stdenv, fetchFromGitHub, jdk6, ant_1_7}: stdenv.mkDerivation rec {
pname = "junit";
version = "3.8.2";
outJar = "junit.jar";
src = fetchFromGitHub {
owner = "junit-team";
repo = pname;
rev = "a0f0ee1b3f72d9361eb09b3a25156c69a748aa47";
hash = "sha256-VJInD9UqMdsbK+kMGslIG0IhAZGbqNrd1pgqlJqBhhU=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
ant
'';
installPhase = ''
mkdir $out
cp -r ./junit3.8.2/* $out/
'';
}

25
java/oro.nix Normal file
View File

@ -0,0 +1,25 @@
{stdenv, fetchzip, jdk6, ant_1_7}: stdenv.mkDerivation rec {
pname = "oro";
version = "2.0.8";
outJar = "jakarta-oro-2.0.8.jar";
src = fetchzip {
url = "https://archive.apache.org/dist/jakarta/oro/source/jakarta-oro-2.0.8.tar.gz";
hash = "sha256-dRxhYwxZ7o/hjrciu8jDVrnjNHIH5jjdUMLcyXxSCAw=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
ant
'';
installPhase = ''
mkdir $out
cp -r ./jakarta-oro-2.0.8.jar $out/jakarta-oro-2.0.8.jar
'';
}

28
java/xerces-api.nix Normal file
View File

@ -0,0 +1,28 @@
{stdenv, fetchFromGitHub, jdk6, ant_1_7}: stdenv.mkDerivation rec {
pname = "xerces";
version = "2.6.2";
outJar = "xmlParserAPIs.jar";
outName = "xmlParserAPIs";
src = fetchFromGitHub {
owner = "apache";
repo = "xerces-j";
rev = "b5692ec46c5823be3f3908899c64cbd8ba9e4f2f";
hash = "sha256-YzrBjetyb6zqBNwnSitf2YrhHUOECoNTLgkI2agHM8g=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
./build.sh jars
'';
installPhase = ''
mkdir $out
cp -r ./build/xmlParserAPIs.jar $out/xmlParserAPIs.jar
'';
}

28
java/xerces.nix Normal file
View File

@ -0,0 +1,28 @@
{stdenv, fetchFromGitHub, jdk6, ant_1_7}: stdenv.mkDerivation rec {
pname = "xerces";
version = "2.6.2";
outJar = "xercesImpl.jar";
outName = "xercesImpl";
src = fetchFromGitHub {
owner = "apache";
repo = "xerces-j";
rev = "b5692ec46c5823be3f3908899c64cbd8ba9e4f2f";
hash = "sha256-YzrBjetyb6zqBNwnSitf2YrhHUOECoNTLgkI2agHM8g=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
./build.sh jar
'';
installPhase = ''
mkdir $out
cp -r ./build/xercesImpl.jar $out/xercesImpl.jar
'';
}

View File

@ -150,10 +150,40 @@ bommels = pkgs.lib.makeScope pkgs.newScope (self: rec {
#jdk6 = self.callPackage ./jdk/jdk6-bootstrap.nix { inherit ant_1_6 gnu-classpath jamvm; };
jdk6 = self.callPackage ./jdk/jdk6-linux.nix { };
ant_1_6_5 = self.callPackage ./gradle/ant_1_6_5.nix { inherit ecj jamvm_1_5_4 gnu-classpath_98 ant-bootstrap; };
junit = self.callPackage ./gradle/junit.nix { inherit ant_1_6_5 jdk6; };
ant_1_7_0 = self.callPackage ./gradle/ant_1_7_0.nix { inherit jdk6 junit; };
gradle_0_0_2 = self.callPackage ./gradle/gradle_0_0_2.nix { inherit jdk6 ant_1_7_0; };
ant_1_6_5 = self.callPackage ./ant/ant_1_6_5.nix { inherit ecj jamvm_1_5_4 gnu-classpath_98 ant-bootstrap; };
junit_4 = self.callPackage ./java/junit_4.nix { inherit ant_1_6_5 jdk6; };
ant_1_7 = self.callPackage ./ant/ant_1_7.nix { inherit jdk6 junit_4; };
ivyDepHook = self.callPackage ./ant/ivyDepHook.nix { };
ivyDep = dep: args: (import ./ant/ivyDep.nix { inherit ivyDepHook; stdenv = pkgs.stdenv; }) dep args;
mavenDepHook = self.callPackage ./ant/mavenDepHook.nix { };
mavenDep = dep: args: (import ./ant/mavenDep.nix { inherit mavenDepHook; stdenv = pkgs.stdenv; }) dep args;
ant_1_6 = self.callPackage ./ant/ant_1_6.nix { inherit jdk6 ant_1_7; };
commons-lang = self.callPackage ./java/commons-lang.nix { inherit jdk6 ant_1_7; };
commons-cli = self.callPackage ./java/commons-cli.nix { inherit jdk6 ant_1_7 commons-lang; };
junit_3_8_1 = self.callPackage ./java/junit_3_8_1.nix { inherit jdk6 ant_1_7; };
commons-logging_1_1 = self.callPackage ./java/commons-logging_1_1.nix { inherit jdk6 ant_1_7 junit_3_8_1; };
commons-codec = self.callPackage ./java/commons-codec.nix { inherit jdk6 ant_1_7; };
commons-httpclient_3 = self.callPackage ./java/commons-httpclient_3.nix { inherit jdk6 ant_1_7 commons-logging_1_1 commons-codec; };
oro = self.callPackage ./java/oro.nix { inherit jdk6 ant_1_7; };
commons-logging_1_0_4 = self.callPackage ./java/commons-logging_1_0_4.nix { inherit jdk6 ant_1_7; };
commons-httpclient_2_0_2 = self.callPackage ./java/commons-httpclient_2_0_2.nix { inherit jdk6 ant_1_7 commons-logging_1_0_4; };
commons-collections = self.callPackage ./java/commons-collections.nix { inherit jdk6 ant_1_7; };
commons-net = self.callPackage ./java/commons-net.nix { inherit jdk6 ant_1_7 oro; };
jsch_0_1_23 = self.callPackage ./java/jsch_0_1_23.nix { inherit jdk6 ant_1_7; };
commons-vfs = self.callPackage ./java/commons-vfs.nix { inherit jdk6 ant_1_7 commons-logging_1_0_4
commons-httpclient_2_0_2 commons-collections commons-net jsch_0_1_23; };
jsch_0_1_25 = self.callPackage ./java/jsch_0_1_25.nix { inherit jdk6 ant_1_7; };
junit_3_8_2 = self.callPackage ./java/junit_3_8_2.nix { inherit jdk6 ant_1_7; };
xerces = self.callPackage ./java/xerces.nix { inherit jdk6 ant_1_7; };
xerces-api = self.callPackage ./java/xerces-api.nix { inherit jdk6 ant_1_7; };
ivy = self.callPackage ./ant/ivy.nix { inherit jdk6 ant_1_7 ant_1_6 commons-cli commons-httpclient_3 oro commons-vfs jsch_0_1_25
junit_3_8_2 commons-lang xerces xerces-api; };
groovy = self.callPackage ./java/groovy.nix { inherit jdk6 ant_1_7; };
gradle_0_0_2 = self.callPackage ./gradle/gradle_0_0_2.nix { inherit jdk6 ant_1_7 ivy commons-cli commons-httpclient_3 groovy; };
gradle = self.callPackage ./gradle.nix { inherit gradle_0_0_2; };
elasticsearch-service = self.callPackage ./elasticsearch-service.nix { inherit gradle; };