uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,26 @@
{lib, stdenv, fetchurl}:
stdenv.mkDerivation rec {
version = "5.2";
pname = "commons-bcel";
src = fetchurl {
url = "mirror://apache/commons/bcel/binaries/bcel-${version}.tar.gz";
sha256 = "13ppnd6afljdjq21jpn4ik2h1yxq8k2kg21ghi0lyb1yap1rd7k6";
};
installPhase = ''
tar xf ${src}
mkdir -p $out/share/java
cp bcel-5.2.jar $out/share/java/
'';
meta = {
homepage = "https://commons.apache.org/proper/commons-bcel/";
description = "Gives users a convenient way to analyze, create, and manipulate (binary) Java class files";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
maintainers = with lib.maintainers; [ copumpkin ];
license = lib.licenses.asl20;
platforms = with lib.platforms; unix;
};
}

View file

@ -0,0 +1,25 @@
{lib, stdenv, fetchurl}:
stdenv.mkDerivation rec {
pname = "commons-bsf";
version = "2.4.0";
src = fetchurl {
url = "mirror://apache/commons/bsf/binaries/bsf-bin-${version}.tar.gz";
sha256 = "1my3hv4y8cvrd1kr315wvbjqsamzlzswnbqcmsa2m4hqcafddfr8";
};
installPhase = ''
mkdir -p $out/share/java
cp lib/bsf.jar $out/share/java/
'';
meta = {
description = "Interface to scripting languages, including JSR-223";
homepage = "https://commons.apache.org/proper/commons-bsf/";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
};
}

View file

@ -0,0 +1,26 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
version = "1.21";
pname = "commons-compress";
src = fetchurl {
url = "mirror://apache/commons/compress/binaries/${pname}-${version}-bin.tar.gz";
sha256 = "sha256-sWF0K5MSOSXUxBLC9+1/RF5ST4tIzVKGnKQvStuVLvM=";
};
installPhase = ''
tar xf ${src}
mkdir -p $out/share/java
cp *.jar $out/share/java/
'';
meta = {
homepage = "https://commons.apache.org/proper/commons-compress";
description = "Allows manipulation of ar, cpio, Unix dump, tar, zip, gzip, XZ, Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE and Z files";
maintainers = with lib.maintainers; [ copumpkin ];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.asl20;
platforms = with lib.platforms; unix;
};
}

View file

@ -0,0 +1,26 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
version = "1.3.0";
pname = "commons-daemon";
src = fetchurl {
url = "mirror://apache/commons/daemon/binaries/commons-daemon-${version}-bin.tar.gz";
sha256 = "sha256-Fihsar8HR2adN2f9deo7bk8tRgeiD6BljVZ/mfkLUUA=";
};
installPhase = ''
tar xf ${src}
mkdir -p $out/share/java
cp *.jar $out/share/java/
'';
meta = {
homepage = "https://commons.apache.org/proper/commons-daemon";
description = "Apache Commons Daemon software is a set of utilities and Java support classes for running Java applications as server processes.";
maintainers = with lib.maintainers; [ rsynnest ];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.asl20;
platforms = with lib.platforms; unix;
};
}

View file

@ -0,0 +1,25 @@
{lib, stdenv, fetchurl}:
stdenv.mkDerivation rec {
version = "1.4";
pname = "commons-fileupload";
src = fetchurl {
url = "mirror://apache/commons/fileupload/binaries/${pname}-${version}-bin.tar.gz";
sha256 = "1avfv4gljp7flra767yzas54vfb6az9s1nhxfjv48jj2x0llxxkx";
};
installPhase = ''
tar xf ${src}
mkdir -p $out/share/java
cp commons-fileupload-*-bin/*.jar $out/share/java/
'';
meta = {
homepage = "https://commons.apache.org/proper/commons-fileupload";
description = "Makes it easy to add robust, high-performance, file upload capability to your servlets and web applications";
maintainers = with lib.maintainers; [ copumpkin ];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.asl20;
platforms = with lib.platforms; unix;
};
}

View file

@ -0,0 +1,26 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
version = "2.11.0";
pname = "commons-io";
src = fetchurl {
url = "mirror://apache/commons/io/binaries/${pname}-${version}-bin.tar.gz";
sha256 = "sha256-9RXVNzjEhdYCYWbB9/xW3rm+gSOuD6+jwAO9zJVt4fk=";
};
installPhase = ''
tar xf ${src}
mkdir -p $out/share/java
cp *.jar $out/share/java/
'';
meta = {
homepage = "https://commons.apache.org/proper/commons-io";
description = "A library of utilities to assist with developing IO functionality";
maintainers = with lib.maintainers; [ copumpkin ];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.asl20;
platforms = with lib.platforms; unix;
};
}

View file

@ -0,0 +1,26 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
version = "3.12.0";
pname = "commons-lang";
src = fetchurl {
url = "mirror://apache/commons/lang/binaries/commons-lang3-${version}-bin.tar.gz";
sha256 = "sha256-MwEkZd/Lf3kKyjM+CevxBeKl+5XCxjiz33kNPvqQjig=";
};
installPhase = ''
tar xf ${src}
mkdir -p $out/share/java
cp *.jar $out/share/java/
'';
meta = {
homepage = "https://commons.apache.org/proper/commons-lang";
description = "Provides additional methods to manipulate standard Java library classes";
maintainers = with lib.maintainers; [ copumpkin ];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.asl20;
platforms = with lib.platforms; unix;
};
}

View file

@ -0,0 +1,25 @@
{lib, stdenv, fetchurl}:
stdenv.mkDerivation rec {
pname = "commons-logging";
version = "1.2";
src = fetchurl {
url = "mirror://apache/commons/logging/binaries/commons-logging-${version}-bin.tar.gz";
sha256 = "1gc70pmcv0x6ibl89jglmr22f8zpr63iaifi49nrq399qw2qhx9z";
};
installPhase = ''
mkdir -p $out/share/java
cp commons-logging-*.jar $out/share/java/
'';
meta = {
description = "Wrapper around a variety of logging API implementations";
homepage = "https://commons.apache.org/proper/commons-logging";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
};
}

View file

@ -0,0 +1,26 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
version = "3.6.1";
pname = "commons-math";
src = fetchurl {
url = "mirror://apache/commons/math/binaries/commons-math3-${version}-bin.tar.gz";
sha256 = "0x4nx5pngv2n4ga11c1s4w2mf6cwydwkgs7da6wwvcjraw57bhkz";
};
installPhase = ''
tar xf ${src}
mkdir -p $out/share/java
cp *.jar $out/share/java/
'';
meta = {
homepage = "https://commons.apache.org/proper/commons-math/";
description = "A library of lightweight, self-contained mathematics and statistics components";
maintainers = with lib.maintainers; [ copumpkin ];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.asl20;
platforms = with lib.platforms; unix;
};
}

View file

@ -0,0 +1,38 @@
{ lib, stdenv, fetchurl, jdk, ant } :
stdenv.mkDerivation rec {
pname = "java-cup";
version = "11b-20160615";
src = fetchurl {
url = "http://www2.cs.tum.edu/projects/cup/releases/java-cup-src-${version}.tar.gz";
sha256 = "1ymz3plngxclh7x3xr31537rvvak7lwyd0qkmnl1mkj5drh77rz0";
};
sourceRoot = ".";
nativeBuildInputs = [ jdk ant ];
patches = [ ./javacup-0.11b_beta20160615-build-xml-git.patch ];
buildPhase = "ant";
installPhase = ''
mkdir -p $out/{bin,share/{java,java-cup}}
cp dist/java-cup-11b.jar $out/share/java-cup/
cp dist/java-cup-11b-runtime.jar $out/share/java/
cat > $out/bin/javacup <<EOF
#! $shell
exec ${jdk.jre}/bin/java -jar $out/share/java-cup/java-cup-11b.jar "\$@"
EOF
chmod a+x $out/bin/javacup
'';
meta = {
homepage = "http://www2.cs.tum.edu/projects/cup/";
description = "LALR parser generator for Java";
license = lib.licenses.mit;
platforms = lib.platforms.all;
maintainers = [ lib.maintainers.romildo ];
};
}

View file

@ -0,0 +1,38 @@
--- javacup/build.xml.orig 2016-06-15 07:10:15.000000000 -0300
+++ javacup/build.xml 2016-07-17 08:46:46.632722844 -0300
@@ -21,26 +21,6 @@
<mkdir dir="${dist}" />
<loadfile property="cupversion" srcFile="version.txt" failonerror="false" />
<property name="cupversion" value="custombuild" unless:set="cupversion"/>
- <exec executable="git" outputproperty="gitversion">
- <arg value="log"/>
- <arg value="-1"/>
- <arg value="--format=%h"/>
- </exec>
- <exec executable="git" outputproperty="changed">
- <arg value="status"/>
- <arg value="--porcelain"/>
- <redirector>
- <outputfilterchain>
- <linecontainsregexp>
- <regexp pattern='^M.*'/>
- </linecontainsregexp>
- <tokenfilter>
- <replaceregex pattern=".*" replace="modifications based on "/>
- </tokenfilter>
- </outputfilterchain>
- </redirector>
- </exec>
- <property name="svnversion">${changed}${gitversion}</property>
</target>
<property environment="env" />
@@ -79,7 +59,7 @@
<copy todir="${java}"><fileset dir="${src}"></fileset></copy>
<replace file="${java}/java_cup/version.java"
token="+ version_str"
- value='+ "v0.11b ${cupversion} (GIT ${svnversion})"'>
+ value='+ "v0.11b ${cupversion}"'>
</replace>
<javac srcdir="${java}" destdir="${classes}" verbose="off" listfiles="off" debug="on" source="1.8" target="1.8">
<classpath refid="libraries"/>

View file

@ -0,0 +1,28 @@
{ lib, stdenv, fetchurl, gettext, jdk8, libmatthew_java }:
stdenv.mkDerivation rec {
pname = "dbus-java";
version = "2.7";
src = fetchurl {
url = "https://dbus.freedesktop.org/releases/dbus-java/dbus-java-${version}.tar.gz";
sha256 = "0cyaxd8x6sxmi6pklkkx45j311a6w51fxl4jc5j3inc4cailwh5y";
};
JAVA_HOME=jdk8;
JAVA="${jdk8}/bin/java";
PREFIX="\${out}";
JAVAUNIXLIBDIR="${libmatthew_java}/lib/jni";
JAVAUNIXJARDIR="${libmatthew_java}/share/java";
buildInputs = [ gettext jdk8 ];
# I'm too lazy to build the documentation
preBuild = ''
sed -i -e "s|all: bin doc man|all: bin|" \
-e "s|install: install-bin install-man install-doc|install: install-bin|" Makefile
'';
meta = with lib; {
platforms = platforms.linux;
maintainers = [ maintainers.sander ];
license = licenses.afl21;
};
}

View file

@ -0,0 +1,30 @@
{lib, stdenv, fetchurl, jdk, unzip}:
stdenv.mkDerivation rec {
pname = "GeoIPJava";
version = "1.2.5";
src = fetchurl {
url = "https://geolite.maxmind.com/download/geoip/api/java/GeoIPJava-${version}.zip";
sha256 = "1gb2d0qvvq7xankz7l7ymbr3qprwk9bifpy4hlgw0sq4i6a55ypd";
};
nativeBuildInputs = [ unzip ];
buildInputs = [ jdk ];
buildPhase =
''
cd source
javac $(find . -name \*.java)
jar cfv maxmindgeoip.jar $(find . -name \*.class)
'';
installPhase =
''
mkdir -p $out/share/java
cp maxmindgeoip.jar $out/share/java
'';
meta = {
description = "GeoIP Java API";
license = lib.licenses.lgpl21Plus;
maintainers = [ lib.maintainers.sander ];
platforms = lib.platforms.unix;
};
}

View file

@ -0,0 +1,39 @@
{ lib, stdenv, fetchurl, unzip, makeWrapper, jre }:
stdenv.mkDerivation rec {
pname = "hsqldb";
version = "2.6.1";
underscoreMajMin = lib.strings.replaceChars ["."] ["_"] (lib.versions.majorMinor version);
src = fetchurl {
url = "mirror://sourceforge/project/hsqldb/hsqldb/hsqldb_${underscoreMajMin}/hsqldb-${version}.zip";
sha256 = "sha256-cixyEwjEt68UOotd1TcJNyVUxTRDx4XyfyYg9k6kRtQ=";
};
nativeBuildInputs = [ unzip makeWrapper ];
buildInputs = [ jre ];
installPhase = ''
runHook preInstall
mkdir -p $out/lib $out/bin
cp -R hsqldb/lib/*.jar $out/lib
makeWrapper ${jre}/bin/java $out/bin/hsqldb --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.server.Server"
makeWrapper ${jre}/bin/java $out/bin/runServer --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.server.Server"
makeWrapper ${jre}/bin/java $out/bin/runManagerSwing --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing"
makeWrapper ${jre}/bin/java $out/bin/runWebServer --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.server.WebServer"
makeWrapper ${jre}/bin/java $out/bin/runManager --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.util.DatabaseManager"
makeWrapper ${jre}/bin/java $out/bin/sqltool --add-flags "-jar $out/lib/sqltool.jar"
runHook postInstall
'';
meta = with lib; {
homepage = "http://hsqldb.org";
description = "A relational, embedable database management system written in Java and a set of related tools";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
platforms = platforms.unix;
license = licenses.bsd3;
};
}

View file

@ -0,0 +1,21 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "httpunit";
version = "1.7";
src = fetchurl {
url = "mirror://sourceforge/httpunit/httpunit-${version}.zip";
sha256 = "09gnayqgizd8cjqayvdpkxrc69ipyxawc96aznfrgdhdiwv8l5zf";
};
buildCommand = ''
cp ./* $out
'';
meta = with lib; {
homepage = "http://httpunit.sourceforge.net";
platforms = platforms.unix;
license = licenses.mit;
};
}

View file

@ -0,0 +1,26 @@
{ fetchFromGitHub, lib, stdenv, ant, jdk }:
stdenv.mkDerivation {
pname = "hydra-ant-logger";
version = "2010.2";
src = fetchFromGitHub {
owner = "NixOS";
repo = "hydra-ant-logger";
rev = "dae3224f4ed42418d3492bdf5bee4f825819006f";
sha256 = "sha256-5oQ/jZfz7izTcYR+N801HYh4lH2MF54PCMnmA4CpRwc=";
};
buildInputs = [ ant jdk ];
buildPhase = "mkdir lib; ant";
installPhase = ''
mkdir -p $out/share/java
cp -v *.jar $out/share/java
'';
meta = {
platforms = lib.platforms.unix;
};
}

View file

@ -0,0 +1,22 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "jdom";
version = "1.0";
src = fetchurl {
url = "http://www.jdom.org/dist/binary/jdom-${version}.tar.gz";
sha256 = "1igmxzcy0s25zcy9vmcw0kd13lh60r0b4qg8lnp1jic33f427pxf";
};
buildCommand = ''
cp -r ./ $out
'';
meta = with lib; {
description = "Java-based solution for accessing, manipulating, and outputting XML data from Java code";
homepage = "http://www.jdom.org";
platforms = platforms.unix;
license = licenses.bsdOriginal;
};
}

View file

@ -0,0 +1,48 @@
{ lib, stdenv, fetchFromGitHub, jdk, jre, ant, libffi, texinfo, pkg-config }:
stdenv.mkDerivation rec {
pname = "jffi";
version = "1.3.9";
src = fetchFromGitHub {
owner = "jnr";
repo = "jffi";
rev = "jffi-${version}";
sha256 = "sha256-VjZYhMbad+AesANG06umRzqMWj+Ebzu59TYK7Tm/bFo=";
};
nativeBuildInputs = [ jdk ant texinfo pkg-config ];
buildInputs = [ libffi ] ;
buildPhase = ''
# The pkg-config script in the build.xml doesn't work propery
# set the lib path manually to work around this.
export LIBFFI_LIBS="${libffi}/lib/libffi.so"
ant -Duse.system.libffi=1 jar
ant -Duse.system.libffi=1 archive-platform-jar
'';
installPhase = ''
mkdir -p $out/share/java
cp -r dist/* $out/share/java
'';
doCheck = true;
checkPhase = ''
# The pkg-config script in the build.xml doesn't work propery
# set the lib path manually to work around this.
export LIBFFI_LIBS="${libffi}/lib/libffi.so"
ant -Duse.system.libffi=1 test
'';
meta = with lib; {
broken = stdenv.isDarwin;
description = "Java Foreign Function Interface ";
homepage = "https://github.com/jnr/jffi";
platforms = platforms.unix;
license = licenses.asl20;
maintainers = with maintainers; [ bachp ];
};
}

View file

@ -0,0 +1,38 @@
{lib, stdenv, fetchurl, jre} :
stdenv.mkDerivation rec {
pname = "jflex";
version = "1.8.2";
src = fetchurl {
url = "http://jflex.de/release/jflex-${version}.tar.gz";
sha256 = "1ar7g6zb2xjgnws3j4cqcp86jplhc9av8cpcjdmxw08x6igd5q51";
};
sourceRoot = "${pname}-${version}";
installPhase = ''
runHook preInstall
mkdir -p $out
cp -a * $out
rm -f $out/bin/jflex.bat
patchShebangs $out
sed -i -e '/^JAVA=java/ s#java#${jre}/bin/java#' $out/bin/jflex
runHook postInstall
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/jflex --version
runHook postInstallCheck
'';
meta = {
homepage = "https://www.jflex.de/";
description = "Lexical analyzer generator for Java, written in Java";
license = lib.licenses.bsd3;
platforms = lib.platforms.unix;
};
}

View file

@ -0,0 +1,20 @@
{lib, stdenv, fetchurl, jdk}:
stdenv.mkDerivation rec {
pname = "libmatthew-java";
version = "0.8";
src = fetchurl {
url = "https://src.fedoraproject.org/repo/pkgs/libmatthew-java/libmatthew-java-${version}.tar.gz/8455b8751083ce25c99c2840609271f5/libmatthew-java-${version}.tar.gz";
sha256 = "1yldkhsdzm0a41a0i881bin2jklhp85y3ah245jd6fz3npcx7l85";
};
JAVA_HOME=jdk;
PREFIX="\${out}";
buildInputs = [ jdk ];
meta = with lib; {
platforms = platforms.linux;
maintainers = [ maintainers.sander ];
license = licenses.mit;
};
}

View file

@ -0,0 +1,33 @@
{ lib, stdenv, fetchurl, makeWrapper, jdk }:
stdenv.mkDerivation rec {
pname = "lombok";
version = "1.18.22";
src = fetchurl {
url = "https://projectlombok.org/downloads/lombok-${version}.jar";
sha256 = "sha256-7O8VgUEdeoLMBCgWZ+4LrF18ClqudM/DhDA5bJHDGDE=";
};
nativeBuildInputs = [ makeWrapper ];
outputs = [ "out" "bin" ];
buildCommand = ''
mkdir -p $out/share/java
cp $src $out/share/java/lombok.jar
makeWrapper ${jdk}/bin/java $bin/bin/lombok \
--add-flags "-cp ${jdk}/lib/openjdk/lib/tools.jar:$out/share/java/lombok.jar" \
--add-flags lombok.launch.Main
'';
meta = {
description = "A library that can write a lot of boilerplate for your Java project";
platforms = lib.platforms.all;
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.mit;
homepage = "https://projectlombok.org/";
maintainers = [ lib.maintainers.CrystalGamma ];
};
}

View file

@ -0,0 +1,21 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "lucene";
version = "1.4.3";
src = fetchurl {
url = "https://archive.apache.org/dist/jakarta/lucene/lucene-${version}.tar.gz";
sha256 = "1mxaxg65f7v8n60irjwm24v7hcisbl0srmpvcy1l4scs6rjj1awh";
};
buildCommand = ''
cp -r . $out/
'';
meta = with lib; {
description = "Java full-text search engine";
platforms = platforms.unix;
license = licenses.asl20;
};
}

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "mockobjects";
version = "0.09";
src = fetchurl {
url = "mirror://sourceforge/mockobjects/mockobjects-bin-${version}.tar";
sha256 = "18rnyqfcyh0s3dwkkaszdd50ssyjx5fa1y3ii309ldqg693lfgnz";
};
# Work around the "unpacker appears to have produced no directories"
setSourceRoot = "sourceRoot=`pwd`";
installPhase = ''
runHook preInstall
mkdir -p $out/share/java
cp mockobjects-*.jar $out/share/java
runHook postInstall
'';
meta = with lib; {
description = "Generic unit testing framework and methodology for testing any kind of code";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
platforms = platforms.unix;
license = licenses.asl20;
};
}

View file

@ -0,0 +1,58 @@
{ fetchurl, lib, stdenv, unzip, ant, javac, jvm }:
let
xbeans = fetchurl {
url = "http://archive.apache.org/dist/xmlbeans/binaries/xmlbeans-2.2.0.zip";
sha256 = "1pb08d9j81d0wz5wj31idz198iwhqb7mch872n08jh1354rjlqwk";
};
in
stdenv.mkDerivation rec {
pname = "rhino";
version = "1.7R2";
src = fetchurl {
url = "mirror://mozilla/js/rhino1_7R2.zip";
sha256 = "1p32hkghi6bkc3cf2dcqyaw5cjj7403mykcp0fy8f5bsnv0pszv7";
};
patches = [ ./gcj-type-mismatch.patch ];
hardeningDisable = [ "fortify" "format" ];
preConfigure =
''
find -name \*.jar -or -name \*.class -exec rm -v {} \;
# The build process tries to download it by itself.
mkdir -p "build/tmp-xbean"
ln -sv "${xbeans}" "build/tmp-xbean/xbean.zip"
'';
nativeBuildInputs = [ unzip ];
buildInputs = [ ant javac jvm ];
buildPhase = "ant jar";
doCheck = false;
# FIXME: Install javadoc as well.
installPhase =
''
mkdir -p "$out/share/java"
cp -v *.jar "$out/share/java"
'';
meta = with lib; {
description = "An implementation of JavaScript written in Java";
longDescription =
'' Rhino is an open-source implementation of JavaScript written
entirely in Java. It is typically embedded into Java applications
to provide scripting to end users.
'';
homepage = "http://www.mozilla.org/rhino/";
license = with licenses; [ mpl11 /* or */ gpl2Plus ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View file

@ -0,0 +1,103 @@
Work around GCJ bug #35410:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35410 .
diff --git a/src/org/mozilla/javascript/Arguments.java b/src/org/mozilla/javascript/Arguments.java
index d914294..d658f12 100644
--- a/src/org/mozilla/javascript/Arguments.java
+++ b/src/org/mozilla/javascript/Arguments.java
@@ -144,7 +144,7 @@ final class Arguments extends IdScriptableObject
synchronized (this) {
if (args[index] != NOT_FOUND) {
if (args == activation.originalArgs) {
- args = args.clone();
+ args = (Object[]) args.clone();
}
args[index] = value;
return;
@@ -162,7 +162,7 @@ final class Arguments extends IdScriptableObject
synchronized (this) {
if (args[index] != NOT_FOUND) {
if (args == activation.originalArgs) {
- args = args.clone();
+ args = (Object[]) args.clone();
}
args[index] = NOT_FOUND;
return;
diff --git a/src/org/mozilla/javascript/FunctionObject.java b/src/org/mozilla/javascript/FunctionObject.java
index 1d6c752..3adc100 100644
--- a/src/org/mozilla/javascript/FunctionObject.java
+++ b/src/org/mozilla/javascript/FunctionObject.java
@@ -455,7 +455,7 @@ public class FunctionObject extends BaseFunction
Object converted = convertArg(cx, scope, arg, typeTags[i]);
if (arg != converted) {
if (invokeArgs == args) {
- invokeArgs = args.clone();
+ invokeArgs = (Object[]) args.clone();
}
invokeArgs[i] = converted;
}
diff --git a/src/org/mozilla/javascript/Interpreter.java b/src/org/mozilla/javascript/Interpreter.java
index f7f544d..e125e2f 100644
--- a/src/org/mozilla/javascript/Interpreter.java
+++ b/src/org/mozilla/javascript/Interpreter.java
@@ -285,9 +285,9 @@ public class Interpreter implements Evaluator
// clone stack but keep varSource to point to values
// from this frame to share variables.
- copy.stack = stack.clone();
- copy.stackAttributes = stackAttributes.clone();
- copy.sDbl = sDbl.clone();
+ copy.stack = (Object[]) stack.clone();
+ copy.stackAttributes = (int[]) stackAttributes.clone();
+ copy.sDbl = (double[]) sDbl.clone();
copy.frozen = false;
return copy;
diff --git a/src/org/mozilla/javascript/NativeJavaClass.java b/src/org/mozilla/javascript/NativeJavaClass.java
index f72f9e7..25c6757 100644
--- a/src/org/mozilla/javascript/NativeJavaClass.java
+++ b/src/org/mozilla/javascript/NativeJavaClass.java
@@ -271,7 +271,7 @@ public class NativeJavaClass extends NativeJavaObject implements Function
Object x = Context.jsToJava(arg, argTypes[i]);
if (x != arg) {
if (args == origArgs) {
- args = origArgs.clone();
+ args = (Object[]) origArgs.clone();
}
args[i] = x;
}
diff --git a/src/org/mozilla/javascript/NativeJavaMethod.java b/src/org/mozilla/javascript/NativeJavaMethod.java
index b6eaf8b..dc699a0 100644
--- a/src/org/mozilla/javascript/NativeJavaMethod.java
+++ b/src/org/mozilla/javascript/NativeJavaMethod.java
@@ -213,7 +213,7 @@ public class NativeJavaMethod extends BaseFunction
Object coerced = Context.jsToJava(arg, argTypes[i]);
if (coerced != arg) {
if (origArgs == args) {
- args = args.clone();
+ args = (Object[]) args.clone();
}
args[i] = coerced;
}
diff --git a/src/org/mozilla/javascript/regexp/NativeRegExp.java b/src/org/mozilla/javascript/regexp/NativeRegExp.java
index 0bae489..f7124bf 100644
--- a/src/org/mozilla/javascript/regexp/NativeRegExp.java
+++ b/src/org/mozilla/javascript/regexp/NativeRegExp.java
@@ -2168,7 +2168,7 @@ System.out.println("Testing at " + gData.cp + ", op = " + op);
// XXX: If backTrackData will no longer be used, then
// there is no need to clone backTrackData.parens
if (backTrackData.parens != null) {
- gData.parens = backTrackData.parens.clone();
+ gData.parens = (long[]) backTrackData.parens.clone();
}
gData.cp = backTrackData.cp;
@@ -2708,7 +2708,7 @@ class REBackTrackData {
continuation_pc = pc;
lastParen = gData.lastParen;
if (gData.parens != null) {
- parens = gData.parens.clone();
+ parens = (long[]) gData.parens.clone();
}
cp = gData.cp;
stateStackTop = gData.stateStackTop;

View file

@ -0,0 +1,86 @@
{ lib, stdenv, fetchurl, unzip, jre, jre8 }:
let
common = { pname, version, src, description, java ? jre
, prog ? null, jar ? null, license ? lib.licenses.mpl20 }:
stdenv.mkDerivation {
name = "${pname}-${version}";
inherit pname version src;
nativeBuildInputs = [ unzip ];
buildCommand = let
prog' = if prog == null then pname else prog;
jar' = if jar == null then pname else jar;
in ''
unzip $src -d $out
mkdir -p $out/bin $out/share $out/share/java
cp -s "$out"/*.jar "$out/share/java/" # */
rm -rf $out/notices
mv $out/doc $out/share
cat > $out/bin/${prog'} <<EOF
#! $shell
export JAVA_HOME=${jre}
exec ${jre}/bin/java -jar $out/${jar'}.jar "\$@"
EOF
chmod a+x $out/bin/${prog'}
'';
meta = with lib; {
inherit description license;
homepage = "http://saxon.sourceforge.net/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
maintainers = with maintainers; [ rvl ];
platforms = platforms.all;
};
};
in {
saxon = common {
pname = "saxon";
version = "6.5.3";
src = fetchurl {
url = "mirror://sourceforge/saxon/saxon6_5_3.zip";
sha256 = "0l5y3y2z4wqgh80f26dwwxwncs8v3nkz3nidv14z024lmk730vs3";
};
description = "XSLT 1.0 processor";
# http://saxon.sourceforge.net/saxon6.5.3/conditions.html
license = lib.licenses.mpl10;
java = jre8;
};
saxonb_8_8 = common {
pname = "saxonb";
version = "8.8";
jar = "saxon8";
src = fetchurl {
url = "mirror://sourceforge/saxon/saxonb8-8j.zip";
sha256 = "15bzrfyd2f1045rsp9dp4znyhmizh1pm97q8ji2bc0b43q23xsb8";
};
description = "Complete and conformant processor of XSLT 2.0, XQuery 1.0, and XPath 2.0";
java = jre8;
};
saxonb_9_1 = common {
pname = "saxonb";
version = "9.1.0.8";
jar = "saxon9";
src = fetchurl {
url = "mirror://sourceforge/saxon/Saxon-B/9.1.0.8/saxonb9-1-0-8j.zip";
sha256 = "1d39jdnwr3v3pzswm81zry6yikqlqy9dp2l2wmpqdiw00r5drg4j";
};
description = "Complete and conformant processor of XSLT 2.0, XQuery 1.0, and XPath 2.0";
};
saxon-he = common {
pname = "saxon-he";
version = "9.9.0.1";
prog = "saxon-he";
jar = "saxon9he";
src = fetchurl {
url = "mirror://sourceforge/saxon/Saxon-HE/9.9/SaxonHE9-9-0-1J.zip";
sha256 = "1inxd7ia7rl9fxfrw8dy9sb7rqv76ipblaki5262688wf2dscs60";
};
description = "Processor for XSLT 3.0, XPath 2.0 and 3.1, and XQuery 3.1";
};
}

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "smack";
version = "4.1.9";
src = fetchurl {
url = "http://www.igniterealtime.org/downloadServlet?filename=smack/smack_${lib.replaceStrings ["."] ["_"] version}.tar.gz";
sha256 = "009x0qcxd4dkvwcjz2nla470pwbabwvg37wc21pslpw42ldi0bzp";
};
sourceRoot = ".";
installPhase = ''
runHook preInstall
mkdir -p $out/share/java
cp libs/smack-*.jar $out/share/java
runHook postInstall
'';
meta = {
description = "A XMPP (Jabber) client library for instant messaging and presence";
homepage = "http://www.igniterealtime.org/projects/smack/";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
platforms = lib.platforms.unix;
license = lib.licenses.asl20;
};
}

View file

@ -0,0 +1,8 @@
--- a/make_linux.mak
+++ b/make_linux.mak
@@ -63,4 +63,4 @@
AWT_LFLAGS = -shared ${SWT_LFLAGS}
-AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt
+AWT_LIBS = `pkg-config --libs x11` -L$(AWT_LIB_PATH) -ljawt

View file

@ -0,0 +1,158 @@
{ lib
, stdenv
, canonicalize-jars-hook
, fetchzip
, pkg-config
, atk
, glib
, gtk2
, jdk
, libGL
, libGLU
, libXt
, libXtst
, gnome2
}:
let
platformMap = {
x86_64-linux =
{ platform = "gtk-linux-x86_64";
sha256 = "17frac2nsx22hfa72264as31rn35hfh9gfgy0n6wvc3knl5d2716"; };
i686-linux =
{ platform = "gtk-linux-x86";
sha256 = "13ca17rga9yvdshqvh0sfzarmdcl4wv4pid0ls7v35v4844zbc8b"; };
x86_64-darwin =
{ platform = "cocoa-macosx-x86_64";
sha256 = "0wjyxlw7i9zd2m8syd6k1q85fj8pzhxlfsrl8fpgsj37p698bd0a"; };
};
metadata = assert platformMap ? ${stdenv.hostPlatform.system};
platformMap.${stdenv.hostPlatform.system};
in stdenv.mkDerivation rec {
pname = "swt";
version = "4.5";
fullVersion = "${version}-201506032000";
hardeningDisable = [ "format" ];
# Alas, the Eclipse Project apparently doesn't produce source-only
# releases of SWT. So we just grab a binary release and extract
# "src.zip" from that.
src = fetchzip {
url = "https://archive.eclipse.org/eclipse/downloads/drops4/" +
"R-${fullVersion}/${pname}-${version}-${metadata.platform}.zip";
inherit (metadata) sha256;
stripRoot = false;
postFetch = ''
mkdir "$unpackDir"
cd "$unpackDir"
renamed="$TMPDIR/src.zip"
mv "$out/src.zip" "$renamed"
unpackFile "$renamed"
rm -r "$out"
mv "$unpackDir" "$out"
'';
};
nativeBuildInputs = [
canonicalize-jars-hook
pkg-config
];
buildInputs = [
atk
gtk2
jdk
libGL
libGLU
libXtst
gnome2.gnome_vfs
gnome2.libgnome
gnome2.libgnomeui
] ++ lib.optionals (lib.hasPrefix "8u" jdk.version) [
libXt
];
patches = [ ./awt-libs.patch ./gtk-libs.patch ];
prePatch = ''
# clear whitespace from makefiles (since we match on EOL later)
sed -i 's/ \+$//' ./*.mak
'';
postPatch = let makefile-sed = builtins.toFile "swt-makefile.sed" (''
# fix pkg-config invocations in CFLAGS/LIBS pairs.
#
# change:
# FOOCFLAGS = `pkg-config --cflags `foo bar`
# FOOLIBS = `pkg-config --libs-only-L foo` -lbaz
# into:
# FOOCFLAGS = `pkg-config --cflags foo bar`
# FOOLIBS = `pkg-config --libs foo bar`
#
# the latter works more consistently.
/^[A-Z0-9_]\+CFLAGS = `pkg-config --cflags [^`]\+`$/ {
N
s'' +
"/" + ''
^\([A-Z0-9_]\+\)CFLAGS = `pkg-config --cflags \(.\+\)`\
\1LIBS = `pkg-config --libs-only-L .\+$'' +
"/" + ''
\1CFLAGS = `pkg-config --cflags \2`\
\1LIBS = `pkg-config --libs \2`'' +
"/\n" + ''
}
# fix WebKit libs not being there
s/\$(WEBKIT_LIB) \$(WEBKIT_OBJECTS)$/\0 `pkg-config --libs glib-2.0`/g
''); in ''
declare -a makefiles=(./*.mak)
sed -i -f ${makefile-sed} "''${makefiles[@]}"
# assign Makefile variables eagerly & change backticks to `$(shell …)`
sed -i -e 's/ = `\([^`]\+\)`/ := $(shell \1)/' \
-e 's/`\([^`]\+\)`/$(shell \1)/' \
"''${makefiles[@]}"
'';
buildPhase = ''
runHook preBuild
export JAVA_HOME=${jdk}
./build.sh
mkdir out
find org/ -name '*.java' -type f -exec javac -d out/ {} +
runHook postBuild
'';
installPhase = ''
runHook preInstall
if [ -n "$prefix" ]; then
mkdir -p "$prefix"
fi
mkdir -p "$out/lib"
cp -t "$out/lib" ./*.so
mkdir -p "$out/jars"
cp -t out/ version.txt
(cd out && jar -c *) > "$out/jars/swt.jar"
runHook postInstall
'';
meta = with lib; {
homepage = "https://www.eclipse.org/swt/";
description = ''
A widget toolkit for Java to access the user-interface facilities of
the operating systems on which it is implemented.
'';
license = licenses.epl10;
maintainers = with maintainers; [ bb010g ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,14 @@
--- a/make_linux.mak
+++ b/make_linux.mak
@@ -53,9 +53,4 @@
-# Do not use pkg-config to get libs because it includes unnecessary dependencies (i.e. pangoxft-1.0)
-GTKCFLAGS = `pkg-config --cflags gtk+-$(GTK_VERSION) gtk+-unix-print-$(GTK_VERSION)`
+GTKCFLAGS = `pkg-config --cflags gtk+-$(GTK_VERSION) gthread-2.0 gtk+-unix-print-$(GTK_VERSION) x11 xtst`
+GTKLIBS = `pkg-config --libs gtk+-$(GTK_VERSION) gthread-2.0 gtk+-unix-print-$(GTK_VERSION) x11 xtst`
-ifeq ($(GTK_VERSION), 3.0)
-GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-3 -lgdk-3 -lcairo -lgthread-2.0 -lXtst
-else
-GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-x11-$(GTK_VERSION) -lgthread-2.0 -lXtst
-endif