diff --git a/pkgs/development/libraries/libepoxy/default.nix b/pkgs/development/libraries/libepoxy/default.nix index cd98e2229fe2..9fab4c72947e 100644 --- a/pkgs/development/libraries/libepoxy/default.nix +++ b/pkgs/development/libraries/libepoxy/default.nix @@ -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" ]; }; -} +})