octavePackages.image: add inputs to test environment for graphical tests

Some Octave packages require OpenGL for their unit tests, e.g.
`octavePackages.image`. Previously, this test script would have
erroneous failures because OpenGL could not be found. [1] suggested
that we add these to the test environment to remove these incorrect
failures.

Fixing OpenGL being missing actually meant that gnuplot needed to be
pulled in, because these unit tests were plotting AND doing graphics.
And because gnuplot needs fonts, we need fontconfig too.

[1] https://github.com/NixOS/nixpkgs/pull/491992#issuecomment-3944950414

Co-authored-by: Michael Daniels <mdaniels5757@gmail.com>
Co-authored-by: Karl Hallsby <karl@hallsby.com>
This commit is contained in:
Karl Hallsby
2026-02-25 20:55:44 -06:00
committed by Michael Daniels
parent 4398adf72e
commit 4ab8ef78ec
2 changed files with 22 additions and 1 deletions
@@ -2,6 +2,10 @@
buildOctavePackage,
lib,
fetchurl,
mesa,
gnuplot,
makeFontsConf,
writableTmpDirAsHomeHook,
}:
buildOctavePackage rec {
@@ -13,6 +17,16 @@ buildOctavePackage rec {
sha256 = "sha256-pYY8E5LZd+pPNwzFVH4EsXY8K3fXs6Hyz2zYweXkmRk=";
};
nativeOctavePkgTestInputs = [
mesa
gnuplot
writableTmpDirAsHomeHook
];
octavePkgTestEnv.FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
__structuredAttrs = true;
meta = {
homepage = "https://gnu-octave.github.io/packages/image/";
license = lib.licenses.gpl3Plus;
+8 -1
View File
@@ -116,7 +116,14 @@ makeScope newScope (
inherit (pkgs) gsl;
};
image = callPackage ../development/octave-modules/image { };
image = callPackage ../development/octave-modules/image {
inherit (pkgs)
mesa
gnuplot
makeFontsConf
writableTmpDirAsHomeHook
;
};
image-acquisition = callPackage ../development/octave-modules/image-acquisition { };