diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/java')
30 files changed, 1134 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/java/commons/bcel/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/bcel/default.nix new file mode 100644 index 000000000000..053d06f34a6e --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/commons/bcel/default.nix @@ -0,0 +1,26 @@ +{lib, stdenv, fetchurl}: + +stdenv.mkDerivation rec { + version = "6.6.1"; + pname = "commons-bcel"; + + src = fetchurl { + url = "mirror://apache/commons/bcel/binaries/bcel-${version}-bin.tar.gz"; + sha256 = "sha256-bwbERZqnmXD2LzGilDZYsr7BPQoTeZDwDU/8/AjAdP4="; + }; + + installPhase = '' + tar xf ${src} + mkdir -p $out/share/java + cp bcel-${version}.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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/commons/bsf/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/bsf/default.nix new file mode 100644 index 000000000000..f55029335e58 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/commons/bsf/default.nix @@ -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; + }; +} + diff --git a/nixpkgs/pkgs/development/libraries/java/commons/compress/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/compress/default.nix new file mode 100644 index 000000000000..bda8a4c0dd1f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/commons/compress/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + version = "1.23.0"; + pname = "commons-compress"; + + src = fetchurl { + url = "mirror://apache/commons/compress/binaries/${pname}-${version}-bin.tar.gz"; + sha256 = "sha256-m+7cc7h9xVXKlLBTTr2L91AFWDTN+hNSycxDNO0oBAI="; + }; + + 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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/commons/daemon/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/daemon/default.nix new file mode 100644 index 000000000000..be61630d17f4 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/commons/daemon/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + version = "1.3.4"; + pname = "commons-daemon"; + + src = fetchurl { + url = "mirror://apache/commons/daemon/binaries/commons-daemon-${version}-bin.tar.gz"; + sha256 = "sha256-n9zmdPC4nLs/Rnth9uojkc5Kg5IfgERbr08TOvENR0Q="; + }; + + 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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/commons/fileupload/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/fileupload/default.nix new file mode 100644 index 000000000000..40c66909213e --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/commons/fileupload/default.nix @@ -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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/commons/io/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/io/default.nix new file mode 100644 index 000000000000..7c1c9f361145 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/commons/io/default.nix @@ -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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/commons/lang/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/lang/default.nix new file mode 100644 index 000000000000..9eca9e3070b2 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/commons/lang/default.nix @@ -0,0 +1,31 @@ +{ lib +, stdenv +, fetchurl +}: + +stdenv.mkDerivation (finalAttrs: { + version = "3.13.0"; + pname = "commons-lang"; + + src = fetchurl { + url = "mirror://apache/commons/lang/binaries/commons-lang3-${finalAttrs.version}-bin.tar.gz"; + hash = "sha256-yDEbe1wqyfxuJe2DK55YnNLKLh7JcsHAgp2OohWBwWU="; + }; + + installPhase = '' + runHook preInstall + tar xf ${finalAttrs.src} + mkdir -p $out/share/java + cp *.jar $out/share/java/ + runHook postInstall + ''; + + meta = { + description = "Provides additional methods to manipulate standard Java library classes"; + homepage = "https://commons.apache.org/proper/commons-lang"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ copumpkin ]; + platforms = with lib.platforms; unix; + sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; + }; +}) diff --git a/nixpkgs/pkgs/development/libraries/java/commons/logging/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/logging/default.nix new file mode 100644 index 000000000000..71832498c34a --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/commons/logging/default.nix @@ -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; + }; +} + diff --git a/nixpkgs/pkgs/development/libraries/java/commons/math/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/math/default.nix new file mode 100644 index 000000000000..4f928db4cf3b --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/commons/math/default.nix @@ -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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/cup/default.nix b/nixpkgs/pkgs/development/libraries/java/cup/default.nix new file mode 100644 index 000000000000..f7732ff637af --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/cup/default.nix @@ -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 ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/cup/javacup-0.11b_beta20160615-build-xml-git.patch b/nixpkgs/pkgs/development/libraries/java/cup/javacup-0.11b_beta20160615-build-xml-git.patch new file mode 100644 index 000000000000..f2054ee9d4d3 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/cup/javacup-0.11b_beta20160615-build-xml-git.patch @@ -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"/> diff --git a/nixpkgs/pkgs/development/libraries/java/dbus-java/default.nix b/nixpkgs/pkgs/development/libraries/java/dbus-java/default.nix new file mode 100644 index 000000000000..c8e67edfe2b5 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/dbus-java/default.nix @@ -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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/geoipjava/default.nix b/nixpkgs/pkgs/development/libraries/java/geoipjava/default.nix new file mode 100644 index 000000000000..cbb6b35a65c9 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/geoipjava/default.nix @@ -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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/hsqldb/default.nix b/nixpkgs/pkgs/development/libraries/java/hsqldb/default.nix new file mode 100644 index 000000000000..a2484ce83077 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/hsqldb/default.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchurl, unzip, makeWrapper, jre }: + +stdenv.mkDerivation rec { + pname = "hsqldb"; + version = "2.7.2"; + underscoreMajMin = lib.replaceStrings ["."] ["_"] (lib.versions.majorMinor version); + + src = fetchurl { + url = "mirror://sourceforge/project/hsqldb/hsqldb/hsqldb_${underscoreMajMin}/hsqldb-${version}.zip"; + sha256 = "sha256-/7NZy+ZroxeTF7av22LNJ0dlMzvTAWfOMypLLYWXWBI="; + }; + + 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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/httpunit/default.nix b/nixpkgs/pkgs/development/libraries/java/httpunit/default.nix new file mode 100644 index 000000000000..07afdabd89b2 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/httpunit/default.nix @@ -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 = "https://httpunit.sourceforge.net"; + platforms = platforms.unix; + license = licenses.mit; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/hydra-ant-logger/default.nix b/nixpkgs/pkgs/development/libraries/java/hydra-ant-logger/default.nix new file mode 100644 index 000000000000..4b18cd7cfadc --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/hydra-ant-logger/default.nix @@ -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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/jdom/default.nix b/nixpkgs/pkgs/development/libraries/java/jdom/default.nix new file mode 100644 index 000000000000..f05b45cf0489 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/jdom/default.nix @@ -0,0 +1,31 @@ +{ lib +, stdenv +, fetchzip +}: + +stdenv.mkDerivation rec { + pname = "jdom"; + version = "2.0.6.1"; + + src = fetchzip { + url = "http://www.jdom.org/dist/binary/jdom-${version}.zip"; + stripRoot = false; + hash = "sha256-Y++mlO+7N5EU2NhRzLl5x5WXNqu/2tDO/NpNhfRegcg="; + }; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/java + cp -a . $out/share/java + + runHook postInstall + ''; + + 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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/jffi/default.nix b/nixpkgs/pkgs/development/libraries/java/jffi/default.nix new file mode 100644 index 000000000000..9bbd2135e0b2 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/jffi/default.nix @@ -0,0 +1,48 @@ +{ lib, stdenv, fetchFromGitHub, jdk, jre, ant, libffi, texinfo, pkg-config }: + +stdenv.mkDerivation rec { + pname = "jffi"; + version = "1.3.11"; + + src = fetchFromGitHub { + owner = "jnr"; + repo = "jffi"; + rev = "jffi-${version}"; + sha256 = "sha256-fZnZH2j/IXbfsJkJG8s2ArOrWwVE2kgvSREVaSVoDyo="; + }; + + 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 ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/jflex/default.nix b/nixpkgs/pkgs/development/libraries/java/jflex/default.nix new file mode 100644 index 000000000000..90e4d4329d5e --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/jflex/default.nix @@ -0,0 +1,38 @@ +{lib, stdenv, fetchurl, jre} : + +stdenv.mkDerivation rec { + pname = "jflex"; + version = "1.9.1"; + + src = fetchurl { + url = "http://jflex.de/release/jflex-${version}.tar.gz"; + sha256 = "sha256-4MHp7vkf9t8E1z+l6v8T86ArZ5/uFHTlzK4AciTfbfY="; + }; + + 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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/libmatthew-java/default.nix b/nixpkgs/pkgs/development/libraries/java/libmatthew-java/default.nix new file mode 100644 index 000000000000..6f736403e056 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/libmatthew-java/default.nix @@ -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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/lombok/default.nix b/nixpkgs/pkgs/development/libraries/java/lombok/default.nix new file mode 100644 index 000000000000..ed1d4af35fbd --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/lombok/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchurl, makeWrapper, jdk }: + +stdenv.mkDerivation rec { + pname = "lombok"; + version = "1.18.28"; + + src = fetchurl { + url = "https://projectlombok.org/downloads/lombok-${version}.jar"; + sha256 = "sha256-t3TcT8pUMiXYtejBY360E8Q2Oy5hPpUiJ3b3kqjOwOA="; + }; + + 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 ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/lucene/default.nix b/nixpkgs/pkgs/development/libraries/java/lucene/default.nix new file mode 100644 index 000000000000..9791c0ee4556 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/lucene/default.nix @@ -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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/mockobjects/default.nix b/nixpkgs/pkgs/development/libraries/java/mockobjects/default.nix new file mode 100644 index 000000000000..113c377240b4 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/mockobjects/default.nix @@ -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" + sourceRoot = "."; + + 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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/rhino/default.nix b/nixpkgs/pkgs/development/libraries/java/rhino/default.nix new file mode 100644 index 000000000000..e67425208657 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/rhino/default.nix @@ -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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/rhino/gcj-type-mismatch.patch b/nixpkgs/pkgs/development/libraries/java/rhino/gcj-type-mismatch.patch new file mode 100644 index 000000000000..dac7b209069a --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/rhino/gcj-type-mismatch.patch @@ -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; diff --git a/nixpkgs/pkgs/development/libraries/java/saxon/default.nix b/nixpkgs/pkgs/development/libraries/java/saxon/default.nix new file mode 100644 index 000000000000..4ff3e69c34ce --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/saxon/default.nix @@ -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 = "https://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"; + # https://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"; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/smack/default.nix b/nixpkgs/pkgs/development/libraries/java/smack/default.nix new file mode 100644 index 000000000000..fd263d91d426 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/smack/default.nix @@ -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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/swt/awt-libs.patch b/nixpkgs/pkgs/development/libraries/java/swt/awt-libs.patch new file mode 100644 index 000000000000..6c3ff53b7983 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/swt/awt-libs.patch @@ -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 + diff --git a/nixpkgs/pkgs/development/libraries/java/swt/default.nix b/nixpkgs/pkgs/development/libraries/java/swt/default.nix new file mode 100644 index 000000000000..4c900ed21ac6 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/swt/default.nix @@ -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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/java/swt/gtk-libs.patch b/nixpkgs/pkgs/development/libraries/java/swt/gtk-libs.patch new file mode 100644 index 000000000000..cd13082b5df7 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/java/swt/gtk-libs.patch @@ -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 + |