about summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorAlastair Pharo <asppsa@gmail.com>2017-04-09 16:10:54 +1000
committerAlastair Pharo <asppsa@gmail.com>2017-04-09 16:42:56 +1000
commit250ddfe1a213af6ad600edca0c35b35f0c5d75d7 (patch)
tree0c51f52ffd6fd70533a42686c0ffd2370e5c411a /pkgs/development/interpreters
parentf0ebcc64445bf009d781f494a2e583cbf67846c4 (diff)
downloadnixlib-250ddfe1a213af6ad600edca0c35b35f0c5d75d7.tar
nixlib-250ddfe1a213af6ad600edca0c35b35f0c5d75d7.tar.gz
nixlib-250ddfe1a213af6ad600edca0c35b35f0c5d75d7.tar.bz2
nixlib-250ddfe1a213af6ad600edca0c35b35f0c5d75d7.tar.lz
nixlib-250ddfe1a213af6ad600edca0c35b35f0c5d75d7.tar.xz
nixlib-250ddfe1a213af6ad600edca0c35b35f0c5d75d7.tar.zst
nixlib-250ddfe1a213af6ad600edca0c35b35f0c5d75d7.zip
octave: add runtime texinfo dependency
makeinfo (provided by the texinfo package) is used by the "help"
command in Octave to display info about functions, etc.  By default,
Octave looks for "makeinfo" in the PATH, rather than specifying the
location of the executable.  This results in Nix not being aware that
makeinfo is required at runtime (so unless you happen have makeinfo
available from your path, "help" won't work).

This patch fixes that by setting the path to makeinfo in Octave,
thereby creating a runtime dependency on texinfo.
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/octave/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix
index 3233baea8f40..ab1dc4b5fe1d 100644
--- a/pkgs/development/interpreters/octave/default.nix
+++ b/pkgs/development/interpreters/octave/default.nix
@@ -41,9 +41,15 @@ stdenv.mkDerivation rec {
     ++ (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
   # 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
   '';