From 9ae6cc5967fea7c1f9b217a85103f57c35e39e2f Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Sat, 14 Jun 2014 18:24:31 +0200 Subject: [PATCH 1/7] numexpr: new package, version 2.4 Description from the numexpr project page [1]: > Numexpr is a fast numerical expression evaluator for NumPy. With it, > expressions that operate on arrays (like "3*a+4*b") are accelerated and use > less memory than doing the same calculation in Python. I am adding it, because it is a dependency of the pytables package. [1]: https://github.com/pydata/numexpr --- pkgs/top-level/python-packages.nix | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d4b78e11c89b..3c733f62ff44 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4601,6 +4601,43 @@ rec { }; }; + numexpr = buildPythonPackage rec { + version = "2.4"; + name = "numexpr-${version}"; + + src = fetchgit { + url = https://github.com/pydata/numexpr.git; + rev = "606cc9a110711e947d35ac2770749c00dab184c8"; + sha256 = "1gxgkg7ncgjhnifn444iha5nrjhyr8sr6w5yp204186a1ysz858g"; + }; + + propagatedBuildInputs = with pkgs; [ numpy ]; + + # Run the test suite. + # It requires the build path to be in the python search path. + checkPhase = '' + ${python}/bin/${python.executable} < Date: Sun, 15 Jun 2014 11:12:03 +0200 Subject: [PATCH 2/7] hdf5: Add zlib as optional dependency This adds addition compression modes to the hdf5 library. I am adding this, because pytables depends on it. --- pkgs/tools/misc/hdf5/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/hdf5/default.nix b/pkgs/tools/misc/hdf5/default.nix index 01820aaf7780..8b1f8a3b9644 100644 --- a/pkgs/tools/misc/hdf5/default.nix +++ b/pkgs/tools/misc/hdf5/default.nix @@ -1,6 +1,7 @@ { stdenv , fetchurl +, zlib ? null }: stdenv.mkDerivation { name = "hdf5-1.8.10-patch1"; @@ -8,7 +9,9 @@ stdenv.mkDerivation { url = http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.10-patch1.tar.gz; sha256 = "08ad32fhnci6rdfn6mn3w9v1wcaxdcd326n3ljwkcq4dzhkh28qz"; }; - buildInputs = [] ; + + buildInputs = [] + ++ stdenv.lib.optional (zlib != null) zlib; patches = [./bin-mv.patch]; From c24e85f3a5269e7d5d664620f755334b19b64caa Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Sun, 15 Jun 2014 13:25:43 +0200 Subject: [PATCH 3/7] szip: Fix source hash The hash code of the downloaded source tar-ball was not identical to the one specified in the nix-expression. This commit fixes that problem. --- pkgs/development/libraries/szip/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/szip/default.nix b/pkgs/development/libraries/szip/default.nix index 38cde3bfd707..159b8e6e8386 100644 --- a/pkgs/development/libraries/szip/default.nix +++ b/pkgs/development/libraries/szip/default.nix @@ -4,6 +4,6 @@ stdenv.mkDerivation { name = "szip-2.1"; src = fetchurl { url = ftp://ftp.hdfgroup.org/lib-external/szip/2.1/src/szip-2.1.tar.gz; - sha256 = "05707lrdhwp8mv0dgzh2b6m2mwamv1z6k29m2v1v7pz0c1w2gb6z"; + sha256 = "1vym7r4by02m0yqj10023xyps5b21ryymnxb4nb2gs32arfxj5m8"; }; -} \ No newline at end of file +} From d1f7bc7bcfd2a0a48d22c98c5c626231291c5ea4 Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Sun, 15 Jun 2014 13:26:44 +0200 Subject: [PATCH 4/7] hdf5: Add szip as an optional dependency This adds additional compression modes to hdf5. Note: The szip license may not be compatible with everyone's use case. Hence, it is an optional dependency. --- pkgs/tools/misc/hdf5/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/hdf5/default.nix b/pkgs/tools/misc/hdf5/default.nix index 8b1f8a3b9644..1f5fb78d100c 100644 --- a/pkgs/tools/misc/hdf5/default.nix +++ b/pkgs/tools/misc/hdf5/default.nix @@ -2,6 +2,7 @@ { stdenv , fetchurl , zlib ? null +, szip ? null }: stdenv.mkDerivation { name = "hdf5-1.8.10-patch1"; @@ -11,7 +12,10 @@ stdenv.mkDerivation { }; buildInputs = [] - ++ stdenv.lib.optional (zlib != null) zlib; + ++ stdenv.lib.optional (zlib != null) zlib + ++ stdenv.lib.optional (szip != null) szip; + + configureFlags = if szip != null then "--with-szlib=${szip}" else ""; patches = [./bin-mv.patch]; From 5a960436373a44e25d08ad709ef604fc93b8bf2f Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Sun, 15 Jun 2014 11:59:58 +0200 Subject: [PATCH 5/7] hdf5: Update to 1.8.13 --- pkgs/tools/misc/hdf5/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/misc/hdf5/default.nix b/pkgs/tools/misc/hdf5/default.nix index 1f5fb78d100c..a7d03d1335f0 100644 --- a/pkgs/tools/misc/hdf5/default.nix +++ b/pkgs/tools/misc/hdf5/default.nix @@ -4,11 +4,12 @@ , zlib ? null , szip ? null }: -stdenv.mkDerivation { - name = "hdf5-1.8.10-patch1"; +stdenv.mkDerivation rec { + version = "1.8.13"; + name = "hdf5-${version}-patch1"; src = fetchurl { - url = http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.10-patch1.tar.gz; - sha256 = "08ad32fhnci6rdfn6mn3w9v1wcaxdcd326n3ljwkcq4dzhkh28qz"; + url = "http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-${version}.tar.gz"; + sha256 = "1h9qdl321gzm3ihdhlijbl9sh9qcdrw94j7izg64yfqhxj7b7xl2"; }; buildInputs = [] From 52762ed4163b7eeba076b3393991b19f36798c65 Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Sat, 14 Jun 2014 18:24:50 +0200 Subject: [PATCH 6/7] tables: add new package, version 3.1.1 From the project page [1]: > PyTables is a package for managing hierarchical datasets and designed to > efficiently and easily cope with extremely large amounts of data. It offers read/write access to hdf5 archives through a hierarchical interface. I am adding it, because pandas depends on tables for hdf5 read/write functionality. Note: The name is a bit of an issue. The project is called pytables, whereas the python module is simply called tables. I chose to name the nix-expression tables for consistency with the source-tarball and the module name. [1]: http://www.pytables.org/moin --- .../python-modules/tables/default.nix | 56 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 6 ++ 2 files changed, 62 insertions(+) create mode 100644 pkgs/development/python-modules/tables/default.nix diff --git a/pkgs/development/python-modules/tables/default.nix b/pkgs/development/python-modules/tables/default.nix new file mode 100644 index 000000000000..d3edf54788ab --- /dev/null +++ b/pkgs/development/python-modules/tables/default.nix @@ -0,0 +1,56 @@ +{ stdenv, fetchurl, python, buildPythonPackage +, cython, bzip2, lzo, numpy, numexpr, hdf5 }: + +buildPythonPackage rec { + version = "3.1.1"; + name = "tables-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/pytables/${name}.tar.gz"; + sha256 = "18rdzv9xwiapb5c8y47rk2fi3fdm2dpjf68wfycma67ifrih7f9r"; + }; + + buildInputs = [ hdf5 cython bzip2 lzo ]; + propagatedBuildInputs = [ numpy numexpr ]; + + # The setup script complains about missing run-paths, but they are + # actually set. + setupPyBuildFlags = + [ "--hdf5=${hdf5}" + "--lzo=${lzo}" + "--bzip2=${bzip2}" + ]; + setupPyInstallFlags = setupPyBuildFlags; + + # Run the test suite. + # It requires the build path to be in the python search path. + # These tests take quite some time. + # If the hdf5 library is built with zlib then there is only one + # test-failure. That is the same failure as described in the following + # github issue: + # https://github.com/PyTables/PyTables/issues/269 + checkPhase = '' + ${python}/bin/${python.executable} < Date: Sun, 15 Jun 2014 14:11:37 +0200 Subject: [PATCH 7/7] pandas: Update to 0.14.0 --- pkgs/top-level/python-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ee08823fe0c6..329169e6e262 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4878,11 +4878,11 @@ rec { }); pandas = buildPythonPackage rec { - name = "pandas-0.12.0"; + name = "pandas-0.14.0"; src = fetchurl { url = "https://pypi.python.org/packages/source/p/pandas/${name}.tar.gz"; - sha256 = "0vf865wh1kcq33189ykqgngb25nxhxxch6skfdl3c6w024v4r6xy"; + sha256 = "f7997debca756c4dd5ccdf5a010dfe3d1c7dac98ee706b715d994cf7c9d35528"; }; buildInputs = [ nose ];