Merge pull request #24520 from asppsa/octave-hg
Add Octave HG version, use with purePackages.octave
This commit is contained in:
@@ -41,9 +41,15 @@ stdenv.mkDerivation rec {
|
|||||||
++ (stdenv.lib.optionals (!stdenv.isDarwin) [ mesa libX11 ])
|
++ (stdenv.lib.optionals (!stdenv.isDarwin) [ mesa libX11 ])
|
||||||
;
|
;
|
||||||
|
|
||||||
|
# makeinfo is required by Octave at runtime to display help
|
||||||
|
prePatch = ''
|
||||||
|
substituteInPlace libinterp/corefcn/help.cc \
|
||||||
|
--replace 'Vmakeinfo_program = "makeinfo"' \
|
||||||
|
'Vmakeinfo_program = "${texinfo}/bin/makeinfo"'
|
||||||
|
''
|
||||||
# REMOVE ON VERSION BUMP
|
# REMOVE ON VERSION BUMP
|
||||||
# Needed for Octave-4.2.1 on darwin. See https://savannah.gnu.org/bugs/?50234
|
# Needed for Octave-4.2.1 on darwin. See https://savannah.gnu.org/bugs/?50234
|
||||||
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
+ stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
sed 's/inline file_stat::~file_stat () { }/file_stat::~file_stat () { }/' -i ./liboctave/system/file-stat.cc
|
sed 's/inline file_stat::~file_stat () { }/file_stat::~file_stat () { }/' -i ./liboctave/system/file-stat.cc
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,75 @@
|
|||||||
|
args@{ stdenv, openblas, ghostscript ? null, texinfo
|
||||||
|
|
||||||
|
, # These are arguments that shouldn't be passed to the
|
||||||
|
# octave package.
|
||||||
|
texlive, tex ? texlive.combined.scheme-small
|
||||||
|
, epstool, pstoedit, transfig
|
||||||
|
, lib, fetchhg, callPackage
|
||||||
|
, autoconf, automake, libtool
|
||||||
|
, bison, librsvg, icoutils, gperf
|
||||||
|
|
||||||
|
, # These are options that can be passed in addition to the ones
|
||||||
|
# octave usually takes.
|
||||||
|
# - rev is the HG revision. Use "tip" for the bleeding edge.
|
||||||
|
# - docs can be set to false to skip building documentation.
|
||||||
|
rev ? "23269", docs ? true
|
||||||
|
|
||||||
|
, # All remaining arguments will be passed to the octave package.
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
let
|
||||||
|
octaveArgs = removeAttrs args
|
||||||
|
[ "texlive" "tex"
|
||||||
|
"epstool" "pstoedit" "transfig"
|
||||||
|
"lib" "fetchhg" "callPackage"
|
||||||
|
"autoconf" "automake" "libtool"
|
||||||
|
"bison" "librsvg" "icoutils" "gperf"
|
||||||
|
"rev" "docs"
|
||||||
|
];
|
||||||
|
octave = callPackage ./default.nix octaveArgs;
|
||||||
|
|
||||||
|
# List of hashes for known HG revisions.
|
||||||
|
sha256s = {
|
||||||
|
"23269" = "87f560e873ad1454fdbcdd8aca65f9f0b1e605bdc00aebbdc4f9d862ca72ff1d";
|
||||||
|
};
|
||||||
|
|
||||||
|
in lib.overrideDerivation octave (attrs: rec {
|
||||||
|
version = "4.3.0pre${rev}";
|
||||||
|
name = "octave-${version}";
|
||||||
|
|
||||||
|
src = fetchhg {
|
||||||
|
url = http://www.octave.org/hg/octave;
|
||||||
|
inherit rev;
|
||||||
|
|
||||||
|
sha256 =
|
||||||
|
if builtins.hasAttr rev sha256s
|
||||||
|
then builtins.getAttr rev sha256s
|
||||||
|
else null;
|
||||||
|
|
||||||
|
fetchSubrepos = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Octave's test for including this flag seems to be broken in 4.3.
|
||||||
|
F77_INTEGER_8_FLAG = optional openblas.blas64 "-fdefault-integer-8";
|
||||||
|
|
||||||
|
# This enables texinfo to find the files it needs.
|
||||||
|
TEXINPUTS = ".:build-aux:${texinfo}/texmf-dist/tex/generic/epsf:";
|
||||||
|
|
||||||
|
disableDocs = !docs || ghostscript == null;
|
||||||
|
|
||||||
|
nativeBuildInputs = attrs.nativeBuildInputs
|
||||||
|
++ [ autoconf automake libtool bison librsvg icoutils gperf ]
|
||||||
|
++ optionals (!disableDocs) [ tex epstool pstoedit transfig ];
|
||||||
|
|
||||||
|
# Run bootstrap before any other patches, as other patches may refer
|
||||||
|
# to files that are generated by the bootstrap.
|
||||||
|
prePatch = ''
|
||||||
|
patchShebangs bootstrap
|
||||||
|
./bootstrap
|
||||||
|
'' + attrs.prePatch;
|
||||||
|
|
||||||
|
configureFlags = attrs.configureFlags ++
|
||||||
|
optional disableDocs "--disable-docs";
|
||||||
|
})
|
||||||
@@ -19,7 +19,9 @@ stdenv.mkDerivation rec {
|
|||||||
description = "An Octave module for the Pure programming language";
|
description = "An Octave module for the Pure programming language";
|
||||||
homepage = http://puredocs.bitbucket.org/pure-octave.html;
|
homepage = http://puredocs.bitbucket.org/pure-octave.html;
|
||||||
license = stdenv.lib.licenses.gpl3Plus;
|
license = stdenv.lib.licenses.gpl3Plus;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
# This is set to none for now because it does not work with the
|
||||||
|
# current stable version of Octave.
|
||||||
|
platforms = stdenv.lib.platforms.none;
|
||||||
maintainers = with stdenv.lib.maintainers; [ asppsa ];
|
maintainers = with stdenv.lib.maintainers; [ asppsa ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{ stdenv, fetchurl }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
version = "3.08";
|
||||||
|
name = "epstool-${version}";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://ftp.de.debian.org/debian/pool/main/e/epstool/epstool_${version}+repack.orig.tar.gz";
|
||||||
|
sha256 = "1pfgqbipwk36clhma2k365jkpvyy75ahswn8jczzys382jalpwgk";
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
make EPSTOOL_ROOT=$out install
|
||||||
|
'';
|
||||||
|
|
||||||
|
patches = [ ./gcc43.patch ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A utility to create or extract preview images in EPS files, fix bounding boxes and convert to bitmaps";
|
||||||
|
homepage = http://pages.cs.wisc.edu/~ghost/gsview/epstool.htm;
|
||||||
|
license = licenses.gpl2;
|
||||||
|
maintainers = [ maintainers.asppsa ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
--- epstool-3.08.orig/src/epstool.c 2005-06-10 04:41:00.000000000 -0500
|
||||||
|
+++ epstool-3.08/src/epstool.c 2009-02-16 20:55:43.186140029 -0600
|
||||||
|
@@ -2824,7 +2824,7 @@
|
||||||
|
code = -1;
|
||||||
|
}
|
||||||
|
if ((code==0) && stdout_name && (hChildStdoutWr == -1)) {
|
||||||
|
- handle = open(stdout_name, O_WRONLY | O_CREAT);
|
||||||
|
+ handle = open(stdout_name, O_WRONLY | O_CREAT, 0644);
|
||||||
|
hChildStdoutWr = dup2(handle, 1);
|
||||||
|
if (handle != -1)
|
||||||
|
close(handle);
|
||||||
|
@@ -2832,7 +2832,7 @@
|
||||||
|
code = -1;
|
||||||
|
}
|
||||||
|
if ((code==0) && stderr_name && (hChildStderrWr == -1)) {
|
||||||
|
- handle = open(stderr_name, O_WRONLY | O_CREAT);
|
||||||
|
+ handle = open(stderr_name, O_WRONLY | O_CREAT, 0644);
|
||||||
|
hChildStderrWr = dup2(handle, 2);
|
||||||
|
if (handle != -1)
|
||||||
|
close(handle);
|
||||||
@@ -1674,6 +1674,8 @@ with pkgs;
|
|||||||
|
|
||||||
eplot = callPackage ../tools/graphics/eplot { };
|
eplot = callPackage ../tools/graphics/eplot { };
|
||||||
|
|
||||||
|
epstool = callPackage ../tools/graphics/epstool { };
|
||||||
|
|
||||||
ethtool = callPackage ../tools/misc/ethtool { };
|
ethtool = callPackage ../tools/misc/ethtool { };
|
||||||
|
|
||||||
ettercap = callPackage ../applications/networking/sniffers/ettercap { };
|
ettercap = callPackage ../applications/networking/sniffers/ettercap { };
|
||||||
@@ -5941,17 +5943,29 @@ with pkgs;
|
|||||||
git = gitMinimal;
|
git = gitMinimal;
|
||||||
};
|
};
|
||||||
|
|
||||||
octave = callPackage ../development/interpreters/octave {
|
inherit (
|
||||||
qt = null;
|
let
|
||||||
ghostscript = null;
|
defaultOctaveOptions = {
|
||||||
graphicsmagick = null;
|
qt = null;
|
||||||
llvm = null;
|
ghostscript = null;
|
||||||
hdf5 = null;
|
graphicsmagick = null;
|
||||||
glpk = null;
|
llvm = null;
|
||||||
suitesparse = null;
|
hdf5 = null;
|
||||||
jdk = null;
|
glpk = null;
|
||||||
openblas = if stdenv.isDarwin then openblasCompat else openblas;
|
suitesparse = null;
|
||||||
};
|
jdk = null;
|
||||||
|
openblas = if stdenv.isDarwin then openblasCompat else openblas;
|
||||||
|
};
|
||||||
|
|
||||||
|
hgOctaveOptions =
|
||||||
|
(removeAttrs defaultOctaveOptions ["ghostscript"]) // {
|
||||||
|
overridePlatforms = stdenv.lib.platforms.none;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
octave = callPackage ../development/interpreters/octave defaultOctaveOptions;
|
||||||
|
octaveHg = lowPrio (callPackage ../development/interpreters/octave/hg.nix hgOctaveOptions);
|
||||||
|
}) octave octaveHg;
|
||||||
|
|
||||||
octaveFull = (lowPrio (callPackage ../development/interpreters/octave {
|
octaveFull = (lowPrio (callPackage ../development/interpreters/octave {
|
||||||
qt = qt4;
|
qt = qt4;
|
||||||
overridePlatforms = ["x86_64-linux" "x86_64-darwin"];
|
overridePlatforms = ["x86_64-linux" "x86_64-darwin"];
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ callPackage }:
|
{ callPackage, octaveHg }:
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
audio = callPackage ../development/pure-modules/audio { };
|
audio = callPackage ../development/pure-modules/audio { };
|
||||||
@@ -19,7 +19,7 @@ rec {
|
|||||||
lv2 = callPackage ../development/pure-modules/lv2 { };
|
lv2 = callPackage ../development/pure-modules/lv2 { };
|
||||||
midi = callPackage ../development/pure-modules/midi { };
|
midi = callPackage ../development/pure-modules/midi { };
|
||||||
mpfr = callPackage ../development/pure-modules/mpfr { };
|
mpfr = callPackage ../development/pure-modules/mpfr { };
|
||||||
octave = callPackage ../development/pure-modules/octave { };
|
octave = callPackage ../development/pure-modules/octave { octave = octaveHg; };
|
||||||
odbc = callPackage ../development/pure-modules/odbc { };
|
odbc = callPackage ../development/pure-modules/odbc { };
|
||||||
pandoc = callPackage ../development/pure-modules/pandoc { };
|
pandoc = callPackage ../development/pure-modules/pandoc { };
|
||||||
rational = callPackage ../development/pure-modules/rational { };
|
rational = callPackage ../development/pure-modules/rational { };
|
||||||
|
|||||||
Reference in New Issue
Block a user