libepoxy: added test for pkg-config modules

This commit is contained in:
Eldritch Cookie 2024-01-12 14:42:21 -03:00 committed by Rodney Lorrimar
parent ae8b023ac9
commit 51c7525a64
No known key found for this signature in database
GPG key ID: D8B75C95FB4D1143

View file

@ -11,13 +11,14 @@
, Carbon
, OpenGL
, x11Support ? !stdenv.isDarwin
, testers
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "libepoxy";
version = "1.5.10";
src = fetchFromGitHub {
src = with finalAttrs; fetchFromGitHub {
owner = "anholt";
repo = pname;
rev = version;
@ -58,7 +59,7 @@ stdenv.mkDerivation rec {
mesonFlags = [
"-Degl=${if (x11Support && !stdenv.isDarwin) then "yes" else "no"}"
"-Dglx=${if x11Support then "yes" else "no"}"
"-Dtests=${lib.boolToString doCheck}"
"-Dtests=${lib.boolToString finalAttrs.doCheck}"
"-Dx11=${lib.boolToString x11Support}"
];
@ -66,6 +67,12 @@ stdenv.mkDerivation rec {
doCheck = true;
passthru.tests = {
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
};
meta = with lib; {
description = "A library for handling OpenGL function pointer management";
homepage = "https://github.com/anholt/libepoxy";
@ -74,4 +81,4 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
pkgConfigModules = [ "epoxy" ];
};
}
})