From 9f2a2a6a84f5c7d18f7684e6d0e7f349d6a1a503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 8 Apr 2009 20:06:03 +0000 Subject: [PATCH] Adding qhull, and updating octaves. svn path=/nixpkgs/trunk/; revision=14955 --- .../interpreters/octave/default.nix | 10 +++--- pkgs/development/interpreters/octave/hg.nix | 12 +++---- pkgs/development/libraries/qhull/default.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 12 +++++-- 4 files changed, 53 insertions(+), 14 deletions(-) create mode 100644 pkgs/development/libraries/qhull/default.nix diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix index 787682f1e2c..ae75e222c09 100644 --- a/pkgs/development/interpreters/octave/default.nix +++ b/pkgs/development/interpreters/octave/default.nix @@ -1,14 +1,14 @@ -{stdenv, fetchurl, g77, readline, ncurses, perl, flex}: +{stdenv, fetchurl, g77, readline, ncurses, perl, flex, texinfo, qhull}: assert readline != null && ncurses != null && flex != null; assert g77.langF77; stdenv.mkDerivation { - name = "octave-2.9.6"; + name = "octave-3.0.4"; src = fetchurl { - url = ftp://ftp.octave.org/pub/octave/bleeding-edge/octave-2.9.6.tar.bz2; - md5 = "10f07dbc0951a7318502a9f1e51e6388"; + url = ftp://ftp.octave.org/pub/octave/octave-3.0.4.tar.bz2; + sha256 = "1rkpzig0r0zrm73avxgai0zqkz9hv4js57i1xxdzcm22qw22szaj"; }; - buildInputs = [g77 readline ncurses perl flex]; + buildInputs = [g77 readline ncurses perl flex texinfo qhull]; configureFlags = "--enable-readline --enable-dl --disable-static --enable-shared"; } diff --git a/pkgs/development/interpreters/octave/hg.nix b/pkgs/development/interpreters/octave/hg.nix index 037a2ab66b0..f4ecde662aa 100644 --- a/pkgs/development/interpreters/octave/hg.nix +++ b/pkgs/development/interpreters/octave/hg.nix @@ -1,10 +1,10 @@ {stdenv, fetchurl, g77, readline, ncurses, perl, flex, - bison, autoconf, automake, sourceByName, getConfig, lib, atlas, gperf, python, glibc, gnuplot, texinfo, texLive}: + bison, autoconf, automake, sourceByName, getConfig, lib, atlas, gperf, python, glibc, gnuplot, texinfo, texLive, qhull, libX11}: assert readline != null && ncurses != null && flex != null; assert g77.langF77; -let commonBuildInputs = [g77 readline ncurses perl glibc]; in +let commonBuildInputs = [g77 readline ncurses perl glibc qhull libX11 texinfo]; in stdenv.mkDerivation ({ NIX_LDFLAGS = "-lpthread"; @@ -26,7 +26,7 @@ stdenv.mkDerivation ({ ./autogen.sh export HOME=$TMP ''; - buildInputs = commonBuildInputs ++ [ flex bison autoconf automake gperf gnuplot texinfo texLive ] + buildInputs = commonBuildInputs ++ [ flex bison autoconf automake gperf gnuplot texLive ] ++ lib.optionals (getConfig ["octave" "atlas"] true) [ python atlas ]; # it does build, but documentation doesn't.. So just remove that directory # from the buildfile @@ -38,10 +38,10 @@ stdenv.mkDerivation ({ make ''; } else { - name = "octave-3.1.51"; + name = "octave-3.1.55"; src = fetchurl { - url = ftp://ftp.octave.org/pub/octave/bleeding-edge/octave-3.1.51.tar.bz2; - sha256 = "0v0khhpmydyimvdl2rswfd0jrcqa9rhd3cyi60zhqv2hi0bhmkh8"; + url = ftp://ftp.octave.org/pub/octave/bleeding-edge/octave-3.1.55.tar.bz2; + sha256 = "1lm4v85kdic4n5yxwzrdb0v6dc6nw06ljgx1q8hfkmi146kpg7s6"; }; buildInputs = commonBuildInputs ++ [ flex bison autoconf automake python ] ++ lib.optionals (getConfig ["octave" "atlas"] true) [ python atlas ]; diff --git a/pkgs/development/libraries/qhull/default.nix b/pkgs/development/libraries/qhull/default.nix new file mode 100644 index 00000000000..522c0cb7535 --- /dev/null +++ b/pkgs/development/libraries/qhull/default.nix @@ -0,0 +1,33 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation { + name = "qhull-2003.1"; + src = fetchurl { + url = http://www.qhull.org/download/qhull-2003.1-src.tgz; + sha256 = "1ah6yhh8qxqmvjcpmijibxcw8gjwvdcrb9g7j2rkawazq95a2j0s"; + }; + + NIX_CFLAGS_COMPILE = "-fno-strict-aliasing " + + (if stdenv.system == "x86_64-linux" then "-fPIC" else ""); + + patchPhase = '' + cd src + sed -i -e "s@/usr/local@$out@" Makefile; + sed -i -e "s@man/man1@share/man/man1@" Makefile; + ''; + + installPhase = '' + ensureDir $out/bin + ensureDir $out/include/qhull + ensureDir $out/lib + ensureDir $out/share/man/man1 + cp *.h $out/include/qhull + cp libqhull.a $out/lib + ''; + + meta = { + homepage = http://www.qhull.org/; + description = "Computes the convex hull, Delaunay triangulation, ..."; + license = "free"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c32691abda9..2e676c9d64a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1152,6 +1152,10 @@ let inherit stdenv fetchurl python antlr; }; + qhull = import ../development/libraries/qhull { + inherit stdenv fetchurl; + }; + qtparted = import ../tools/misc/qtparted { inherit fetchurl stdenv e2fsprogs ncurses readline parted zlib qt3; inherit (xlibs) libX11 libXext; @@ -2116,15 +2120,17 @@ let }; octave = import ../development/interpreters/octave { - inherit stdenv fetchurl readline ncurses perl flex; + inherit stdenv fetchurl readline ncurses perl flex qhull texinfo; g77 = g77_42; }; # mercurial (hg) bleeding edge version octaveHG = import ../development/interpreters/octave/hg.nix { - inherit fetchurl readline ncurses perl flex atlas getConfig glibc; + inherit fetchurl readline ncurses perl flex atlas getConfig glibc qhull; inherit automake autoconf bison gperf lib python gnuplot texinfo texLive; # for dev Version - stdenv = overrideGCC stdenv gcc40; + inherit stdenv; + inherit (xlibs) libX11; + #stdenv = overrideGCC stdenv gcc40; g77 = g77_42; inherit (bleedingEdgeRepos) sourceByName; };