From 73d2e4f49d230e24cf912f6f6429071946ed1d4c Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 29 Aug 2008 13:53:28 +0000 Subject: [PATCH] - Some Ruby interpreter bumped version - Kernel headers 2.6.18 added (XEN virtual images) - unifdef package added for kernel headers 2.6.18 - Python Zope and 4suite added - Trying bioconductor packages with R-lang (still failing) - Bumped gmp version - Added rq cluster runner - still requires extra gems (installs, but does not run) svn path=/nixpkgs/trunk/; revision=12766 --- .../networking/cluster/rq/default.nix | 19 ++++++++ .../interpreters/r-lang/default.nix | 21 ++++++--- pkgs/development/libraries/gmp/default.nix | 11 ++--- .../biology/bioconductor/bioconductor.nix | 43 +++++++++++++++++++ pkgs/development/libraries/sqlite/default.nix | 6 ++- .../python-modules/4suite/default.nix | 13 ++++++ .../python-modules/zope/default.nix | 15 +++++++ .../zope/zope_python-2.4.4.patch | 12 ++++++ .../zope/zope_python-readline.patch | 12 ++++++ .../tools/misc/unifdef/default.nix | 24 +++++++++++ .../linux/kernel-headers/2.6.18.5.nix | 23 ++++++++++ pkgs/top-level/all-packages.nix | 18 +++++++- 12 files changed, 203 insertions(+), 14 deletions(-) create mode 100644 pkgs/applications/networking/cluster/rq/default.nix create mode 100644 pkgs/development/libraries/science/biology/bioconductor/bioconductor.nix create mode 100644 pkgs/development/python-modules/4suite/default.nix create mode 100644 pkgs/development/python-modules/zope/default.nix create mode 100644 pkgs/development/python-modules/zope/zope_python-2.4.4.patch create mode 100644 pkgs/development/python-modules/zope/zope_python-readline.patch create mode 100644 pkgs/development/tools/misc/unifdef/default.nix create mode 100644 pkgs/os-specific/linux/kernel-headers/2.6.18.5.nix diff --git a/pkgs/applications/networking/cluster/rq/default.nix b/pkgs/applications/networking/cluster/rq/default.nix new file mode 100644 index 000000000000..7451042b6da7 --- /dev/null +++ b/pkgs/applications/networking/cluster/rq/default.nix @@ -0,0 +1,19 @@ +{stdenv, fetchurl, sqlite, ruby }: + +stdenv.mkDerivation { + name = "rq-3.4.0"; + src = fetchurl { + url = http://www.codeforpeople.com/lib/ruby/rq/rq-3.4.0.tgz; + sha256 = "1g8wiv83dcn4vzk9wjjzs9vjnwzwpy4h84h34cj32wfz793wfb8b"; + }; + + buildInputs = [ ruby ]; + + installPhase = "ruby install.rb"; + + meta = { + license = "Ruby"; + homepage = "http://www.codeforpeople.com/lib/ruby/rq/"; + description = "rq is a tool used to create instant linux clusters by managing sqlite databases as nfs mounted priority work queues"; + }; +} diff --git a/pkgs/development/interpreters/r-lang/default.nix b/pkgs/development/interpreters/r-lang/default.nix index 8cf7cce28806..63971dece1f2 100644 --- a/pkgs/development/interpreters/r-lang/default.nix +++ b/pkgs/development/interpreters/r-lang/default.nix @@ -1,19 +1,28 @@ -{stdenv, fetchurl, readline, perl, gfortran, libX11, libpng, libXt, zlib}: +{stdenv, fetchurl, readline, perl, gfortran, libX11, libpng, libXt, zlib, +withBioconductor ? false +}: stdenv.mkDerivation { - name = "r-lang-2.7.0"; + name = "r-lang"; + version = "2.7.0"; src = fetchurl { url = http://cran.r-project.org/src/base/R-2/R-2.7.0.tar.gz; sha256 = "17ql1j5d9rfpxs04j9v9qyxiysc9nh6yr43lgfdamayzjpia5jqm"; }; + bioconductor = if withBioconductor then import ../development/libraries/science/biology/bioconductor { inherit fetchurl stdenv readline; } else null; + buildInputs = [readline perl gfortran libpng libX11 libXt zlib]; configureFlags = ["--enable-R-shlib"] ; - meta = { - description = "R is a language and environment for statistical computing and graphics"; - longDescription = ''R is a language and environment for statistical computing and graphics. It is a GNU project which is similar to the S language. R provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, ...) and graphical techniques, and is highly extensible.''; - license = "GPL2"; + meta = { + description = "R is a language and environment for statistical computing and graphics"; + longDescription = ''R is a language and environment for statistical computin +g and graphics. It is a GNU project which is similar to the S language. R provid +es a wide variety of statistical (linear and nonlinear modelling, classical stat +istical tests, time-series analysis, classification, clustering, ...) and graphi +cal techniques, and is highly extensible.''; + license = "GPL2"; homepage = http://www.r-project.org/; }; } diff --git a/pkgs/development/libraries/gmp/default.nix b/pkgs/development/libraries/gmp/default.nix index 48d3446b7810..78839f35ad22 100644 --- a/pkgs/development/libraries/gmp/default.nix +++ b/pkgs/development/libraries/gmp/default.nix @@ -1,16 +1,17 @@ -{stdenv, fetchurl, m4, cxx ? true}: +{stdenv, fetchurl, m4, cxx ? true }: stdenv.mkDerivation { - name = "gmp-4.2.2"; + name = "gmp-4.2.3"; src = fetchurl { - url = mirror://gnu/gmp/gmp-4.2.2.tar.bz2; - sha256 = "0yv593sk62ypn21gg2x570g955lmsi4i6f2bc3s43p52myn0lb1b"; + url = mirror://gnu/gmp/gmp-4.2.3.tar.bz2; + sha256 = "139b5abc49833832184c0a03ff6fc64c59ef102b420d2a5884ad78af5647414b"; }; - buildInputs = [m4]; + buildInputs = [m4 stdenv.gcc.libc ]; configureFlags = if cxx then "--enable-cxx" else "--disable-cxx"; doCheck = true; + postBuild = "make check"; # Test the compiler for being correct meta = { description = "A free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers"; diff --git a/pkgs/development/libraries/science/biology/bioconductor/bioconductor.nix b/pkgs/development/libraries/science/biology/bioconductor/bioconductor.nix new file mode 100644 index 000000000000..d48511cead39 --- /dev/null +++ b/pkgs/development/libraries/science/biology/bioconductor/bioconductor.nix @@ -0,0 +1,43 @@ +{stdenv, fetchurl, rLang}: + +let + + /* Function to compile Bioconductor packages */ + + buildBioConductor = + { pname, pver, src, postInstall ? ""}: + + stdenv.mkDerivation { + name = "${pname}-${pver}"; + + inherit src; + + buildInputs = [rLang]; + + # dontAddPrefix = true; + + # preBuild = "makeFlagsArray=(dictdir=$out/lib/aspell datadir=$out/lib/aspell)"; + + inherit postInstall; + installPhase = '' + R CMD INSTALL ${affyioSrc} + ''; + + meta = { + description = "Bioconductor package for ${pname}"; + }; + }; + +in { + + affyio = buildBioC { + pname = "affyio"; + pver = "1.8.1"; + src = fetchurl { + url = http://www.bioconductor.org/packages/release/bioc/src/contrib/affyio_1.8.1.tar.gz; + sha256 = "136nkpq870vrwf9z5gq32xjzrp8bjfbk9pn8fki2a5w2lr0qc8nh"; + }; + }; + + +} diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix index 087372a6617b..b6cede8e1489 100644 --- a/pkgs/development/libraries/sqlite/default.nix +++ b/pkgs/development/libraries/sqlite/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl}: +{stdenv, fetchurl, readline}: stdenv.mkDerivation { name = "sqlite-3.5.9"; @@ -9,7 +9,9 @@ stdenv.mkDerivation { url = http://www.sqlite.org/sqlite-3.5.9.tar.gz; sha256 = "0731zj0fnivhfc74wc3yh0p9gn7fpjgy3g79haarciqkdf8k3lvx"; }; - + + buildInputs = [readline]; + meta = { homepage = http://www.sqlite.org/; description = "A self-contained, serverless, zero-configuration, transactional SQL database engine"; diff --git a/pkgs/development/python-modules/4suite/default.nix b/pkgs/development/python-modules/4suite/default.nix new file mode 100644 index 000000000000..9f900e4f50ab --- /dev/null +++ b/pkgs/development/python-modules/4suite/default.nix @@ -0,0 +1,13 @@ +{stdenv, fetchurl, python}: + +stdenv.mkDerivation rec { + version = "1.0.2"; + name = "4suite-${version}"; + src = fetchurl { + url = "mirror://sourceforge/foursuite/4Suite-XML-${version}.tar.bz2"; + sha256 = "0g5cyqxhhiqnvqk457k8sb97r18pwgx6gff18q5296xd3zf4cias"; + }; + buildInputs = [python]; + buildPhase = "true"; + installPhase = "python ./setup.py install --prefix=$out"; +} diff --git a/pkgs/development/python-modules/zope/default.nix b/pkgs/development/python-modules/zope/default.nix new file mode 100644 index 000000000000..3dc5da98e769 --- /dev/null +++ b/pkgs/development/python-modules/zope/default.nix @@ -0,0 +1,15 @@ +{stdenv, fetchurl, python}: + +stdenv.mkDerivation rec { + version = "3.2.1"; + name = "zope-${version}"; + src = fetchurl { + url = "http://www.zope.org/Products/Zope3/${version}/Zope-${version}.tgz"; + sha256 = "8431984af75054e4ddfe45bf708924240f8b6b02220cd84d090138413ac82341"; + }; + patches = [ + ./zope_python-2.4.4.patch + ./zope_python-readline.patch + ]; + buildInputs = [python]; +} diff --git a/pkgs/development/python-modules/zope/zope_python-2.4.4.patch b/pkgs/development/python-modules/zope/zope_python-2.4.4.patch new file mode 100644 index 000000000000..223604129641 --- /dev/null +++ b/pkgs/development/python-modules/zope/zope_python-2.4.4.patch @@ -0,0 +1,12 @@ +diff -r 8833d4892dfc Zope-3.2.1/configure +--- a/configure Mon Aug 18 14:55:39 2008 +0200 ++++ b/configure Mon Aug 18 14:57:39 2008 +0200 +@@ -21,7 +21,7 @@ prefix="$DEFAULT_PREFIX" + + # Place the optimal target version number (as returned by sys.version) + # below +-TARGET="2.4.2" ++TARGET="2.4.4" + + # Order a list of "acceptable" python version numbers (as returned by + # sys.version) below in "best" to "worst" order, not including the diff --git a/pkgs/development/python-modules/zope/zope_python-readline.patch b/pkgs/development/python-modules/zope/zope_python-readline.patch new file mode 100644 index 000000000000..4775cfba49b9 --- /dev/null +++ b/pkgs/development/python-modules/zope/zope_python-readline.patch @@ -0,0 +1,12 @@ +diff -r 8833d4892dfc Zope-3.2.1/Dependencies/zope.publisher-Zope-3.2.1/zope.publisher/http.py +--- a/Dependencies/zope.publisher-Zope-3.2.1/zope.publisher/http.py Mon Aug 18 14:55:39 2008 +0200 ++++ b/Dependencies/zope.publisher-Zope-3.2.1/zope.publisher/http.py Mon Aug 18 16:37:02 2008 +0200 +@@ -198,7 +198,7 @@ class HTTPInputStream(object): + self.cacheStream.write(data) + return data + +- def readline(self): ++ def readline(self, size=None): + data = self.stream.readline() + self.cacheStream.write(data) + return data diff --git a/pkgs/development/tools/misc/unifdef/default.nix b/pkgs/development/tools/misc/unifdef/default.nix new file mode 100644 index 000000000000..7ba421b14a47 --- /dev/null +++ b/pkgs/development/tools/misc/unifdef/default.nix @@ -0,0 +1,24 @@ +{ fetchurl, stdenv }: + +stdenv.mkDerivation { + name = "unifdef-1.0"; + + src = fetchurl { + url = http://freshmeat.net/redir/unifdef/10933/url_tgz/unifdef-1.0.tar.gz; + sha256 = "d14c30b1e2e9745e4b067ab86337c93ad907b4e9ee1c414d45291bf7f0c19dad"; + }; + + buildPhase = '' + make unifdef + ''; + + installPhase = '' + ensureDir $out/bin + cp unifdef $out/bin + ''; + + meta = { + description = "useful for removing #ifdef'ed lines from a file while otherwise leaving the file alone"; + + }; +} diff --git a/pkgs/os-specific/linux/kernel-headers/2.6.18.5.nix b/pkgs/os-specific/linux/kernel-headers/2.6.18.5.nix new file mode 100644 index 000000000000..cf4efd159e8f --- /dev/null +++ b/pkgs/os-specific/linux/kernel-headers/2.6.18.5.nix @@ -0,0 +1,23 @@ +{stdenv, fetchurl, unifdef}: + +assert stdenv.isLinux; + +stdenv.mkDerivation { + name = "linux-headers-2.6.18.5"; + builder = ./builder.sh; + src = fetchurl { + url = "mirror://kernel/linux/kernel/v2.6/linux-2.6.18.5.tar.bz2"; + sha256 = "24f0e0011cdae42e3dba56107bb6a60c57c46d1d688a9b0300fec53e80fd1e53"; + }; + + buildInputs = [ unifdef ]; + + platform = + if stdenv.system == "i686-linux" then "i386" else + if stdenv.system == "x86_64-linux" then "x86_64" else + if stdenv.system == "powerpc-linux" then "powerpc" else + abort "don't know what the kernel include directory is called for this platform"; + + extraIncludeDirs = + if stdenv.system == "powerpc-linux" then ["ppc"] else []; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e687d8ed3f25..6fa4bbc144f7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -570,6 +570,10 @@ let stdenv = stdenvNew; }; + unifdef = import ../development/tools/misc/unifdef { + inherit fetchurl stdenv; + }; + coreutils = useFromStdenv "coreutils" ((if stdenv ? isDietLibC then import ../tools/misc/coreutils-5 @@ -2032,12 +2036,17 @@ let rLang = import ../development/interpreters/r-lang { inherit fetchurl stdenv readline perl gfortran libpng zlib; inherit (xorg) libX11 libXt; + withBioconductor = getConfig ["rLang" "withBioconductor"] false; }; rubygems = builderDefsPackage (import ../development/interpreters/ruby/gems.nix) { inherit ruby makeWrapper; }; + rq = import ../applications/networking/cluster/rq { + inherit fetchurl stdenv sqlite ruby; + }; + spidermonkey = import ../development/interpreters/spidermonkey { inherit fetchurl stdenv readline; }; @@ -3543,7 +3552,7 @@ let }; sqlite = import ../development/libraries/sqlite { - inherit fetchurl stdenv; + inherit fetchurl stdenv readline; }; t1lib = import ../development/libraries/t1lib { @@ -4505,6 +4514,10 @@ let ### DEVELOPMENT / PYTHON MODULES + foursuite = import ../development/python-modules/4suite { + inherit fetchurl stdenv python; + }; + bsddb3 = import ../development/python-modules/bsddb3 { inherit fetchurl stdenv python db4; }; @@ -4596,6 +4609,9 @@ let inherit fetchurl stdenv python; }; + zope = import ../development/python-modules/zope { + inherit fetchurl stdenv python; + }; ### SERVERS