Unverified Commit 7322145b authored by Jordan Williams's avatar Jordan Williams
Browse files

matio: avoid ac_cv_av_copy check to fix cross building

Set ac_cv_av_copy to indicate the av_copy function exists.
The function should exist in C99 implementations.

Add passthru tests and update script.
Remove use of pname.
Reduce scope of lib.
Add myself as maintainer.
parent 982377a5
Loading
Loading
Loading
Loading
+34 −1
Original line number Diff line number Diff line
{
  fetchurl,
  hdf5,
  lib,
  matio,
  nix-update-script,
  pkgconf,
  stdenv,
  testers,
  validatePkgConfig,
  zlib,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -13,13 +20,39 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-naaYk0ohVprwWOY0hWRmb0UCnmwrCHjKDY+WCb93uNg=";
  };

  configureFlags = [ "ac_cv_va_copy=1" ];

  nativeBuildInputs = [
    pkgconf
    validatePkgConfig
  ];

  buildInputs = [
    hdf5
    zlib
  ];

  passthru = {
    tests = {
      pkg-config = testers.hasPkgConfigModules {
        package = matio;
        versionCheck = true;
      };
      version = testers.testVersion {
        package = matio;
      };
    };
    updateScript = nix-update-script { };
  };

  meta = {
    changelog = "https://sourceforge.net/p/matio/news/";
    description = "C library for reading and writing Matlab MAT files";
    homepage = "http://matio.sourceforge.net/";
    license = lib.licenses.bsd2;
    maintainers = [ ];
    maintainers = with lib.maintainers; [ jwillikers ];
    mainProgram = "matdump";
    platforms = lib.platforms.all;
    pkgConfigModules = [ "matio" ];
  };
})