From 97d00eda9dfd9232e4b5067bcdc54542b1ab029f Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Thu, 26 Dec 2024 10:44:23 -0600 Subject: [PATCH] octavePackages.ltfat: Set LD_LIBRARY_PATH for building packages Some Octave packages ship C/C++/Fortran code that needs to be compiled and linked against Octave's internal shared objects. Previously, ld could not find these packages because $LD_LIBRARY_PATH was empty. --- pkgs/development/interpreters/octave/build-octave-package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/interpreters/octave/build-octave-package.nix b/pkgs/development/interpreters/octave/build-octave-package.nix index 43760c6c511e3..eaba806e957d7 100644 --- a/pkgs/development/interpreters/octave/build-octave-package.nix +++ b/pkgs/development/interpreters/octave/build-octave-package.nix @@ -123,6 +123,10 @@ stdenv.mkDerivation ( else preBuild; + # Add Octave's shared objects to ld library path for some packages which + # need to link their C/C++/Fortran code against Octave's internals. + LD_LIBRARY_PATH = lib.makeLibraryPath nativeBuildInputs'; + buildPhase = '' runHook preBuild