From eae3eed78f3bcba5009c9a1228102c906681fec0 Mon Sep 17 00:00:00 2001 From: Eldritch Cookie Date: Tue, 16 Jan 2024 12:28:31 -0300 Subject: [PATCH] vulkan-loader: add meta.pkgConfigModules Co-authored-by: Rodney Lorrimar --- .../libraries/vulkan-loader/default.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/vulkan-loader/default.nix b/pkgs/development/libraries/vulkan-loader/default.nix index 958cc2dadc7b..8b0f236acf4e 100644 --- a/pkgs/development/libraries/vulkan-loader/default.nix +++ b/pkgs/development/libraries/vulkan-loader/default.nix @@ -1,14 +1,15 @@ { lib, stdenv, fetchFromGitHub, cmake, pkg-config, libX11, libxcb -, libXrandr, wayland, moltenvk, vulkan-headers, addOpenGLRunpath }: +, libXrandr, wayland, moltenvk, vulkan-headers, addOpenGLRunpath +, testers }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "vulkan-loader"; version = "1.3.275.0"; src = fetchFromGitHub { owner = "KhronosGroup"; repo = "Vulkan-Loader"; - rev = "vulkan-sdk-${version}"; + rev = "vulkan-sdk-${finalAttrs.version}"; hash = "sha256-53PUXAWiK38ciV6oMvD7ZHdXi4RU4r0RmDWUUHU3mE0="; }; @@ -34,12 +35,19 @@ stdenv.mkDerivation rec { } ''; + passthru = { + tests.pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + }; + }; + meta = with lib; { description = "LunarG Vulkan loader"; homepage = "https://www.lunarg.com"; platforms = platforms.unix ++ platforms.windows; license = licenses.asl20; maintainers = [ maintainers.ralith ]; - broken = (version != vulkan-headers.version); + broken = finalAttrs.version != vulkan-headers.version; + pkgConfigModules = [ "vulkan" ]; }; -} +})