From 7322145b03415901e7bae78f770b141ec8c533b8 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Mon, 16 Dec 2024 06:05:20 -0600 Subject: [PATCH] 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. --- pkgs/by-name/ma/matio/package.nix | 35 ++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ma/matio/package.nix b/pkgs/by-name/ma/matio/package.nix index 7b4953064e8e..f763608c3cb5 100644 --- a/pkgs/by-name/ma/matio/package.nix +++ b/pkgs/by-name/ma/matio/package.nix @@ -1,7 +1,14 @@ { 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" ]; }; })