From 588a5e92a32a94ca0b19d2336383a3467cf5dc28 Mon Sep 17 00:00:00 2001 From: Daniel Peebles Date: Sat, 20 Sep 2014 02:19:32 -0400 Subject: [PATCH] Add commons-math (binary until I get maven build working) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop jakarta name from fileupload and update its version Jakarta regexp has been officially retired, and nothing in nixpkgs uses it, so let’s get rid of it. Add commons-io More commons additions/cleanup Closes #4181 Signed-off-by: Mateusz Kowalczyk --- .../libraries/java/commons/bcel/default.nix | 4 ++-- .../java/commons/compress/default.nix | 24 +++++++++++++++++++ .../java/commons/fileupload/default.nix | 23 ++++++++++++++++++ .../libraries/java/commons/io/default.nix | 24 +++++++++++++++++++ .../libraries/java/commons/lang/default.nix | 24 +++++++++++++++++++ .../libraries/java/commons/math/default.nix | 24 +++++++++++++++++++ .../jakarta-commons/file-upload/builder.sh | 6 ----- .../jakarta-commons/file-upload/default.nix | 11 --------- .../libraries/java/jakarta-regexp/default.nix | 18 -------------- .../java/jakarta-regexp/java-bin-builder.sh | 6 ----- pkgs/top-level/all-packages.nix | 14 +++++++---- 11 files changed, 131 insertions(+), 47 deletions(-) create mode 100644 pkgs/development/libraries/java/commons/compress/default.nix create mode 100644 pkgs/development/libraries/java/commons/fileupload/default.nix create mode 100644 pkgs/development/libraries/java/commons/io/default.nix create mode 100644 pkgs/development/libraries/java/commons/lang/default.nix create mode 100644 pkgs/development/libraries/java/commons/math/default.nix delete mode 100755 pkgs/development/libraries/java/jakarta-commons/file-upload/builder.sh delete mode 100644 pkgs/development/libraries/java/jakarta-commons/file-upload/default.nix delete mode 100644 pkgs/development/libraries/java/jakarta-regexp/default.nix delete mode 100755 pkgs/development/libraries/java/jakarta-regexp/java-bin-builder.sh diff --git a/pkgs/development/libraries/java/commons/bcel/default.nix b/pkgs/development/libraries/java/commons/bcel/default.nix index ac9b6a53bf32..0bcd164a525d 100644 --- a/pkgs/development/libraries/java/commons/bcel/default.nix +++ b/pkgs/development/libraries/java/commons/bcel/default.nix @@ -2,10 +2,10 @@ stdenv.mkDerivation rec { version = "5.2"; - name = "bcel-${version}"; + name = "commons-bcel-${version}"; src = fetchurl { - url = "mirror://apache/commons/bcel/binaries/${name}.tar.gz"; + url = "mirror://apache/commons/bcel/binaries/bcel-${version}.tar.gz"; sha256 = "13ppnd6afljdjq21jpn4ik2h1yxq8k2kg21ghi0lyb1yap1rd7k6"; }; diff --git a/pkgs/development/libraries/java/commons/compress/default.nix b/pkgs/development/libraries/java/commons/compress/default.nix new file mode 100644 index 000000000000..2c20d9a9b362 --- /dev/null +++ b/pkgs/development/libraries/java/commons/compress/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + version = "1.8.1"; + name = "commons-compress-${version}"; + + src = fetchurl { + url = "mirror://apache/commons/compress/binaries/${name}-bin.tar.gz"; + sha256 = "11viabgf34r3zx1avj51n00hzmx89kym3i90l6a5v5dbfh61h0lp"; + }; + + installPhase = '' + tar xf ${src} + mkdir -p $out/share/java + cp *.jar $out/share/java/ + ''; + + meta = { + homepage = "http://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 stdenv.lib.maintainers; [ copumpkin ]; + license = stdenv.lib.licenses.asl20; + }; +} diff --git a/pkgs/development/libraries/java/commons/fileupload/default.nix b/pkgs/development/libraries/java/commons/fileupload/default.nix new file mode 100644 index 000000000000..ebb8a7d7f9db --- /dev/null +++ b/pkgs/development/libraries/java/commons/fileupload/default.nix @@ -0,0 +1,23 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation rec { + version = "1.3.1"; + name = "commons-fileupload-${version}"; + + src = fetchurl { + url = "mirror://apache/commons/fileupload/binaries/${name}-bin.tar.gz"; + sha256 = "1jy7w2j2ay56mpq4ij3331cf9zgpkm832ydr63svb35j0ymnky72"; + }; + installPhase = '' + tar xf ${src} + mkdir -p $out/share/java + cp lib/*.jar $out/share/java/ + ''; + + meta = { + homepage = "http://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 stdenv.lib.maintainers; [ copumpkin ]; + license = stdenv.lib.licenses.asl20; + }; +} diff --git a/pkgs/development/libraries/java/commons/io/default.nix b/pkgs/development/libraries/java/commons/io/default.nix new file mode 100644 index 000000000000..5c80bcadf4b9 --- /dev/null +++ b/pkgs/development/libraries/java/commons/io/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + version = "2.4"; + name = "commons-io-${version}"; + + src = fetchurl { + url = "mirror://apache/commons/io/binaries/${name}-bin.tar.gz"; + sha256 = "0m5xmjfr9k2zmbrz425q530jd0lm6368c4wm3jsjlsrqmqjpsvz1"; + }; + + installPhase = '' + tar xf ${src} + mkdir -p $out/share/java + cp *.jar $out/share/java/ + ''; + + meta = { + homepage = "http://commons.apache.org/proper/commons-io"; + description = "A library of utilities to assist with developing IO functionality"; + maintainers = with stdenv.lib.maintainers; [ copumpkin ]; + license = stdenv.lib.licenses.asl20; + }; +} diff --git a/pkgs/development/libraries/java/commons/lang/default.nix b/pkgs/development/libraries/java/commons/lang/default.nix new file mode 100644 index 000000000000..82806871a62e --- /dev/null +++ b/pkgs/development/libraries/java/commons/lang/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + version = "3.3.2"; + name = "commons-lang-${version}"; + + src = fetchurl { + url = "mirror://apache/commons/lang/binaries/commons-lang3-${version}-bin.tar.gz"; + sha256 = "1fmcx52h4cd2b7bplm7wy3725vh8bix64j3ykkxcn357y4j8ddzr"; + }; + + installPhase = '' + tar xf ${src} + mkdir -p $out/share/java + cp *.jar $out/share/java/ + ''; + + meta = { + homepage = "http://commons.apache.org/proper/commons-lang"; + description = "Provides additional methods to manipulate standard Java library classes"; + maintainers = with stdenv.lib.maintainers; [ copumpkin ]; + license = stdenv.lib.licenses.asl20; + }; +} diff --git a/pkgs/development/libraries/java/commons/math/default.nix b/pkgs/development/libraries/java/commons/math/default.nix new file mode 100644 index 000000000000..ed04e2f410b4 --- /dev/null +++ b/pkgs/development/libraries/java/commons/math/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + version = "3.3"; + name = "commons-math-${version}"; + + src = fetchurl { + url = "mirror://apache/commons/math/binaries/commons-math3-${version}-bin.tar.gz"; + sha256 = "1xs71c4vbai6zr84982g4ggv6c18dhkilkzw9n1irjqnjbgm5kzc"; + }; + + installPhase = '' + tar xf ${src} + mkdir -p $out/share/java + cp *.jar $out/share/java/ + ''; + + meta = { + homepage = "http://commons.apache.org/proper/commons-math/"; + description = "A library of lightweight, self-contained mathematics and statistics components"; + maintainers = with stdenv.lib.maintainers; [ copumpkin ]; + license = stdenv.lib.licenses.asl20; + }; +} diff --git a/pkgs/development/libraries/java/jakarta-commons/file-upload/builder.sh b/pkgs/development/libraries/java/jakarta-commons/file-upload/builder.sh deleted file mode 100755 index d95feb5eeb44..000000000000 --- a/pkgs/development/libraries/java/jakarta-commons/file-upload/builder.sh +++ /dev/null @@ -1,6 +0,0 @@ -set -e -source $stdenv/setup - -tar zxvf $src -mkdir -p $out -mv $name/* $out diff --git a/pkgs/development/libraries/java/jakarta-commons/file-upload/default.nix b/pkgs/development/libraries/java/jakarta-commons/file-upload/default.nix deleted file mode 100644 index a609532f2825..000000000000 --- a/pkgs/development/libraries/java/jakarta-commons/file-upload/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{stdenv, fetchurl} : - -stdenv.mkDerivation { - name = "commons-fileupload-1.0"; - builder = ./builder.sh; - - src = fetchurl { - url = http://archive.apache.org/dist/jakarta/commons/fileupload/binaries/commons-fileupload-1.0.tar.gz; - md5 = "5618b26b1a5c006d7236fb4465e907b6"; - }; -} \ No newline at end of file diff --git a/pkgs/development/libraries/java/jakarta-regexp/default.nix b/pkgs/development/libraries/java/jakarta-regexp/default.nix deleted file mode 100644 index 55c3beff70a5..000000000000 --- a/pkgs/development/libraries/java/jakarta-regexp/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{stdenv, fetchurl}: - -# I want some provides mechanism for jar files. These -# jars can then be added to the CLASSPATH by a dependent package. - -stdenv.mkDerivation { - name = "jakarta-regexp-1.4"; - builder = ./java-bin-builder.sh; - - src = fetchurl { - url = http://tarballs.nixos.org/jakarta-regexp-1.4.tar.gz; - md5 = "d903d84c949df848009f3bf205b32c97"; - }; - - jars = ["jakarta-regexp-1.4.jar"]; - - buildInputs = [stdenv]; -} diff --git a/pkgs/development/libraries/java/jakarta-regexp/java-bin-builder.sh b/pkgs/development/libraries/java/jakarta-regexp/java-bin-builder.sh deleted file mode 100755 index c26173ab457a..000000000000 --- a/pkgs/development/libraries/java/jakarta-regexp/java-bin-builder.sh +++ /dev/null @@ -1,6 +0,0 @@ -source $stdenv/setup - -tar zxvf $src -cd jakarta-regexp-1.4 -mkdir -p $out/share/java/ -cp jakarta-regexp-1.4.jar $out/share/java/ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6daa69a75417..9553dc27ac68 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6738,10 +6738,18 @@ let stdenv = overrideInStdenv stdenv [gnumake380]; }; - commonsFileUpload = callPackage ../development/libraries/java/jakarta-commons/file-upload { }; - commonsBcel = callPackage ../development/libraries/java/commons/bcel { }; + commonsCompress = callPackage ../development/libraries/java/commons/compress { }; + + commonsFileUpload = callPackage ../development/libraries/java/commons/fileupload { }; + + commonsLang = callPackage ../development/libraries/java/commons/lang { }; + + commonsIo = callPackage ../development/libraries/java/commons/io { }; + + commonsMath = callPackage ../development/libraries/java/commons/math { }; + fastjar = callPackage ../development/tools/java/fastjar { }; httpunit = callPackage ../development/libraries/java/httpunit { }; @@ -6750,8 +6758,6 @@ let gwtwidgets = callPackage ../development/libraries/java/gwt-widgets { }; - jakartaregexp = callPackage ../development/libraries/java/jakarta-regexp { }; - javaCup = callPackage ../development/libraries/java/cup { }; javasvn = callPackage ../development/libraries/java/javasvn { };