From c13c705a7c029b24aaf503a65a47426e796c4677 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 8 Nov 2014 13:20:32 +0000 Subject: [PATCH 1/3] Adds commons-logging Wrapper around a variety of logging API implementations Homepage: http://commons.apache.org/proper/commons-logging/ --- .../java/commons/logging/default.nix | 22 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/development/libraries/java/commons/logging/default.nix diff --git a/pkgs/development/libraries/java/commons/logging/default.nix b/pkgs/development/libraries/java/commons/logging/default.nix new file mode 100644 index 000000000000..ee4074702024 --- /dev/null +++ b/pkgs/development/libraries/java/commons/logging/default.nix @@ -0,0 +1,22 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation { + name = "commons-logging-1.2"; + + src = fetchurl { + url = mirror://apache/commons/logging/binaries/commons-logging-1.2-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 = http://commons.apache.org/proper/commons-logging; + license = stdenv.lib.licenses.asl20; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0117122c0892..3f0a4ea0f7a6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7184,6 +7184,8 @@ let commonsLang = callPackage ../development/libraries/java/commons/lang { }; + commonsLogging = callPackage ../development/libraries/java/commons/logging { }; + commonsIo = callPackage ../development/libraries/java/commons/io { }; commonsMath = callPackage ../development/libraries/java/commons/math { }; From 13490c946784f1b43ee3a26ddfcd53fb9c8160dd Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 8 Nov 2014 13:33:05 +0000 Subject: [PATCH 2/3] Adds commons-bsf Bean Scripting Framework (BSF) is a set of Java classes which provides scripting language support within Java applications, and access to Java objects and methods from scripting languages. Homepage: http://commons.apache.org/proper/commons-bsf/ --- .../libraries/java/commons/bsf/default.nix | 22 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/development/libraries/java/commons/bsf/default.nix diff --git a/pkgs/development/libraries/java/commons/bsf/default.nix b/pkgs/development/libraries/java/commons/bsf/default.nix new file mode 100644 index 000000000000..b29286831841 --- /dev/null +++ b/pkgs/development/libraries/java/commons/bsf/default.nix @@ -0,0 +1,22 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation { + name = "commons-bsf-1.2"; + + src = fetchurl { + url = mirror://apache/commons/bsf/binaries/bsf-bin-2.4.0.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 = http://commons.apache.org/proper/commons-bsf/; + license = stdenv.lib.licenses.asl20; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3f0a4ea0f7a6..adc83bd3b101 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7178,6 +7178,8 @@ let commonsBcel = callPackage ../development/libraries/java/commons/bcel { }; + commonsBsf = callPackage ../development/libraries/java/commons/bsf { }; + commonsCompress = callPackage ../development/libraries/java/commons/compress { }; commonsFileUpload = callPackage ../development/libraries/java/commons/fileupload { }; From 6e737145d7ebf7bf70c25e99c0bf10486d9c316f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 8 Nov 2014 14:00:55 +0000 Subject: [PATCH 3/3] jEdit: update from 4.4.2 to 5.1.0 --- .../editors/jedit/build.xml.patch | 252 ++++++++++++++++++ pkgs/applications/editors/jedit/default.nix | 51 ++-- 2 files changed, 286 insertions(+), 17 deletions(-) create mode 100644 pkgs/applications/editors/jedit/build.xml.patch diff --git a/pkgs/applications/editors/jedit/build.xml.patch b/pkgs/applications/editors/jedit/build.xml.patch new file mode 100644 index 000000000000..2dabaaaed0c9 --- /dev/null +++ b/pkgs/applications/editors/jedit/build.xml.patch @@ -0,0 +1,252 @@ +--- a/build.xml 2013-07-28 18:03:55.000000000 +0100 ++++ b/build.xml 2014-11-12 21:54:48.443482074 +0000 +@@ -42,16 +42,6 @@ + + +- +- +- +- +- +- + + +@@ -89,51 +79,8 @@ + value="true"/> + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + ++ depends="init"> + + +@@ -238,37 +185,6 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + + + + + + + +@@ -611,7 +503,7 @@ + + + ++ depends="init"> + + +@@ -655,7 +547,7 @@ + + + ++ depends="init,setup,unpack-docbook-xsl"> + + + +@@ -679,7 +571,7 @@ + + + ++ depends="init,setup,unpack-docbook-xsl"> + + + +@@ -703,7 +595,7 @@ + + + ++ depends="init,setup,unpack-docbook-xsl"> + + + +@@ -838,7 +730,7 @@ + + + ++ depends="init,setup,unpack-docbook-xsl"> + + +@@ -1143,7 +1035,7 @@ + + + ++ depends="init"> + + + + + + +@@ -1271,7 +1163,7 @@ + + + + + + + ++ depends="init,setup"> + + +@@ -1567,7 +1459,7 @@ + + + + + + + + + diff --git a/pkgs/applications/editors/jedit/default.nix b/pkgs/applications/editors/jedit/default.nix index 8a57f650fb4a..0e11c577fc85 100644 --- a/pkgs/applications/editors/jedit/default.nix +++ b/pkgs/applications/editors/jedit/default.nix @@ -1,32 +1,47 @@ -{ stdenv, fetchurl, ant, jdk }: +{stdenv, fetchurl, ant, jdk, commonsBsf, commonsLogging}: -let version = "4.4.2"; in +let + version = "5.1.0"; + bsh = fetchurl { + url = http://www.beanshell.org/bsh-2.0b4.jar; + sha256 = "1di7hj2yms1m3wa8k70jpw0wzfnrgibpqnvdk33ahfaqi03mqfci"; + }; + bcpg = fetchurl { + url = http://central.maven.org/maven2/org/bouncycastle/bcpg-jdk16/1.46/bcpg-jdk16-1.46.jar; + sha256 = "16xhmwks4l65m5x150nd23y5lyppha9sa5fj65rzhxw66gbli82d"; + }; + jsr305 = fetchurl { + url = http://central.maven.org/maven2/com/google/code/findbugs/jsr305/2.0.0/jsr305-2.0.0.jar; + sha256 = "0s74pv8qjc42c7q8nbc0c3b1hgx0bmk3b8vbk1z80p4bbgx56zqy"; + }; +in stdenv.mkDerivation { name = "jedit-${version}"; - src = fetchurl { url = "mirror://sourceforge/jedit/jedit${version}source.tar.bz2"; - sha256 = "5e9ad9c32871b77ef0b9fe46dcfcea57ec52558d36113b7280194a33430b8ceb"; + sha256 = "015rn4339mp4wrd901x56nr42wfcy429pg54n835c6n34b2jjdc6"; }; - buildInputs = [ ant jdk ]; + buildInputs = [ ant jdk commonsBsf commonsLogging ]; - sourceRoot = "jEdit"; + # This patch removes from the build process: + # - the automatic download of dependencies (see configurePhase); + # - the tests + patches = [ ./build.xml.patch ]; + + configurePhase = '' + mkdir -p lib/ant-contrib/ lib/scripting lib/compile lib/default-plugins + cp ${ant}/lib/ant/lib/ant-contrib-*.jar lib/ant-contrib/ + cp ${bsh} ${bcpg} lib/scripting/ + cp ${jsr305} lib/compile/ + ''; buildPhase = "ant build"; installPhase = '' mkdir -p $out/share/jEdit - cp build/jedit.jar $out/share/jEdit - mkdir -p $out/share/jEdit/modes - cp -r modes/* $out/share/jEdit/modes - mkdir -p $out/share/jEdit/icons - cp -r icons/* $out/share/jEdit/icons - mkdir -p $out/share/jEdit/macros - cp -r macros/* $out/share/jEdit/macros - mkdir -p $out/share/jEdit/doc - cp -r doc/* $out/share/jEdit/doc + cp -r build/jedit.jar doc icons keymaps macros modes startup $out/share/jEdit sed -i "s|Icon=.*|Icon=$out/share/jEdit/icons/jedit-icon48.png|g" package-files/linux/deb/jedit.desktop mkdir -p $out/share/applications @@ -44,9 +59,11 @@ stdenv.mkDerivation { chmod +x $out/bin/jedit ''; - meta = { + meta = with stdenv.lib; { description = "Mature programmer's text editor (Java based)"; homepage = http://www.jedit.org; - license = "GPL"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = [ maintainers.vbgl ]; }; }