From 250ddfe1a213af6ad600edca0c35b35f0c5d75d7 Mon Sep 17 00:00:00 2001 From: Alastair Pharo Date: Sun, 9 Apr 2017 16:10:54 +1000 Subject: [PATCH] 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. --- pkgs/development/interpreters/octave/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix index 3233baea8f4..ab1dc4b5fe1 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 '';