diff --git a/pkgs/development/interpreters/octave/hg.nix b/pkgs/development/interpreters/octave/hg.nix new file mode 100644 index 000000000000..037a2ab66b01 --- /dev/null +++ b/pkgs/development/interpreters/octave/hg.nix @@ -0,0 +1,49 @@ +{stdenv, fetchurl, g77, readline, ncurses, perl, flex, + bison, autoconf, automake, sourceByName, getConfig, lib, atlas, gperf, python, glibc, gnuplot, texinfo, texLive}: + +assert readline != null && ncurses != null && flex != null; +assert g77.langF77; + +let commonBuildInputs = [g77 readline ncurses perl glibc]; in + +stdenv.mkDerivation ({ + NIX_LDFLAGS = "-lpthread"; + configureFlags = "--enable-readline --enable-dl --disable-static --enable-shared"; + meta = { + description = "High-level interactive language for numerical computations"; + homepage = http://www.octave.org; + license = "GPL-3"; + }; +} // ( + if (getConfig ["octave" "devVersion"] false) then { + name = "octave-hg"; # developement version mercurial repo + src = sourceByName "octave"; + # HOME is set to $TMP because octave needs to access ${HOME}/.octave_hist while running targets + # in doc/interpreter.. Maybe this can be done better. This hack is fastest :) + preConfigure = '' + # glob is contained in glibc! Don't know why autotools want to use -lglob + sed -i 's/-lglob//' configure.in + ./autogen.sh + export HOME=$TMP + ''; + buildInputs = commonBuildInputs ++ [ flex bison autoconf automake gperf gnuplot texinfo texLive ] + ++ lib.optionals (getConfig ["octave" "atlas"] true) [ python atlas ]; + # it does build, but documentation doesn't.. So just remove that directory + # from the buildfile + buildPhase = '' + sed -i octMakefile \ + -e 's/^\(INSTALL_SUBDIRS = .*\)doc \(.*\)$/\1 \2/' \ + -e 's/^\(SUBDIRS = .*\)doc \(.*\)$/\1 \2/' \ + -e 's/\$(MAKE) -C doc/#/' + make + ''; + } else { + name = "octave-3.1.51"; + src = fetchurl { + url = ftp://ftp.octave.org/pub/octave/bleeding-edge/octave-3.1.51.tar.bz2; + sha256 = "0v0khhpmydyimvdl2rswfd0jrcqa9rhd3cyi60zhqv2hi0bhmkh8"; + }; + buildInputs = commonBuildInputs ++ [ flex bison autoconf automake python ] + ++ lib.optionals (getConfig ["octave" "atlas"] true) [ python atlas ]; + } +)) diff --git a/pkgs/misc/bleeding-edge-fetch-infos.nix b/pkgs/misc/bleeding-edge-fetch-infos.nix index 339c487562e9..86a75eac5bb1 100644 --- a/pkgs/misc/bleeding-edge-fetch-infos.nix +++ b/pkgs/misc/bleeding-edge-fetch-infos.nix @@ -223,4 +223,8 @@ url = "http://mawercer.de/~nix/repos/hg2git-4c77e121b739d2aac8a23352503763343823f870.tar.gz"; sha256 = "22354d36937bf9e5d3e3dfc1a3ef9e3f2bc183b8e114a23958a2b10f83abc97e"; }; + octave = args: with args; fetchurl { # Mon Dec 1 23:23:49 UTC 2008 + url = "http://mawercer.de/~nix/repos/octave-03b414516dd8.tar.gz"; + sha256 = "28ca0be1407954e746909241bda95c5bf0a04f611e73100c1e3967ddc249c519"; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6ecec7fccaf2..4bdb5b0acb52 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2038,6 +2038,15 @@ let 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 automake autoconf bison gperf lib python gnuplot texinfo texLive; # for dev Version + stdenv = overrideGCC stdenv gcc40; + g77 = g77_42; + inherit (bleedingEdgeRepos) sourceByName; + }; + perl = if !stdenv.isLinux then sysPerl else realPerl; perl58 = if !stdenv.isLinux then sysPerl else