@@ -1,75 +0,0 @@
1−args@{ stdenv, openblas, ghostscript ? null, texinfo
2−
3− , # These are arguments that shouldn't be passed to the
4− # octave package.
5− texlive, tex ? texlive.combined.scheme-small
6− , epstool, pstoedit, transfig
7− , lib, fetchhg, callPackage
8− , autoconf, automake, libtool
9− , bison, librsvg, icoutils, gperf
10−
11− , # These are options that can be passed in addition to the ones
12− # octave usually takes.
13− # - rev is the HG revision. Use "tip" for the bleeding edge.
14− # - docs can be set to false to skip building documentation.
15− rev ? "23269", docs ? true
16−
17− , # All remaining arguments will be passed to the octave package.
18− ...
19− }:
20−
21−with stdenv.lib;
22−let
23− octaveArgs = removeAttrs args
24− [ "texlive" "tex"
25− "epstool" "pstoedit" "transfig"
26− "lib" "fetchhg" "callPackage"
27− "autoconf" "automake" "libtool"
28− "bison" "librsvg" "icoutils" "gperf"
29− "rev" "docs"
30− ];
31− octave = callPackage ./default.nix octaveArgs;
32−
33− # List of hashes for known HG revisions.
34− sha256s = {
35− "23269" = "87f560e873ad1454fdbcdd8aca65f9f0b1e605bdc00aebbdc4f9d862ca72ff1d";
36− };
37−
38−in lib.overrideDerivation octave (attrs: rec {
39− version = "4.3.0pre${rev}";
40− name = "octave-${version}";
41−
42− src = fetchhg {
43− url = http://www.octave.org/hg/octave;
44− inherit rev;
45−
46− sha256 =
47− if builtins.hasAttr rev sha256s
48− then builtins.getAttr rev sha256s
49− else null;
50−
51− fetchSubrepos = true;
52− };
53−
54− # Octave's test for including this flag seems to be broken in 4.3.
55− F77_INTEGER_8_FLAG = optional openblas.blas64 "-fdefault-integer-8";
56−
57− # This enables texinfo to find the files it needs.
58− TEXINPUTS = ".:build-aux:${texinfo}/texmf-dist/tex/generic/epsf:";
59−
60− disableDocs = !docs || ghostscript == null;
61−
62− nativeBuildInputs = attrs.nativeBuildInputs
63− ++ [ autoconf automake libtool bison librsvg icoutils gperf ]
64− ++ optionals (!disableDocs) [ tex epstool pstoedit transfig ];
65−
66− # Run bootstrap before any other patches, as other patches may refer
67− # to files that are generated by the bootstrap.
68− prePatch = ''
69− patchShebangs bootstrap
70− ./bootstrap
71− '' + attrs.prePatch;
72−
73− configureFlags = attrs.configureFlags ++
74− optional disableDocs "--disable-docs";
75−})