Unverified Commit 4ab8ef78 authored by Karl Hallsby's avatar Karl Hallsby Committed by Michael Daniels
Browse files

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: default avatarMichael Daniels <mdaniels5757@gmail.com>
Co-authored-by: default avatarKarl Hallsby <karl@hallsby.com>
parent 4398adf7
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -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 { };