3
0
Fork 0
forked from mirrors/nixpkgs

bleeding edge octave version (without docs)

svn path=/nixpkgs/trunk/; revision=13561
This commit is contained in:
Marc Weber 2008-12-02 22:55:45 +00:00
parent d97a7e08bc
commit 90b53dcccc
3 changed files with 62 additions and 0 deletions

View file

@ -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 ];
}
))

View file

@ -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";
};
}

View file

@ -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