mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
vulkan-loader: enable support for Darwin
This commit is contained in:
parent
f138abff3d
commit
b763399574
@ -1,5 +1,5 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libX11, libxcb
|
||||
, libXrandr, wayland, vulkan-headers, addOpenGLRunpath }:
|
||||
, libXrandr, wayland, moltenvk, vulkan-headers, addOpenGLRunpath }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "vulkan-loader";
|
||||
@ -14,12 +14,12 @@ stdenv.mkDerivation rec {
|
||||
});
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ libX11 libxcb libXrandr vulkan-headers wayland ];
|
||||
buildInputs = [ vulkan-headers ]
|
||||
++ lib.optionals (!stdenv.isDarwin) [ libX11 libxcb libXrandr wayland ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DSYSCONFDIR=${addOpenGLRunpath.driverLink}/share"
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=${vulkan-headers}/include"
|
||||
];
|
||||
cmakeFlags = [ "-DCMAKE_INSTALL_INCLUDEDIR=${vulkan-headers}/include" ]
|
||||
++ lib.optional stdenv.isDarwin "-DSYSCONFDIR=${moltenvk}/share"
|
||||
++ lib.optional stdenv.isLinux "-DSYSCONFDIR=${addOpenGLRunpath.driverLink}/share";
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
|
||||
meta = with lib; {
|
||||
description = "LunarG Vulkan loader";
|
||||
homepage = "https://www.lunarg.com";
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.ralith ];
|
||||
};
|
||||
|
@ -20398,7 +20398,7 @@ with pkgs;
|
||||
|
||||
vulkan-extension-layer = callPackage ../tools/graphics/vulkan-extension-layer { };
|
||||
vulkan-headers = callPackage ../development/libraries/vulkan-headers { };
|
||||
vulkan-loader = callPackage ../development/libraries/vulkan-loader { };
|
||||
vulkan-loader = callPackage ../development/libraries/vulkan-loader { inherit (darwin) moltenvk; };
|
||||
vulkan-tools = callPackage ../tools/graphics/vulkan-tools { };
|
||||
vulkan-tools-lunarg = callPackage ../tools/graphics/vulkan-tools-lunarg { };
|
||||
vulkan-validation-layers = callPackage ../development/tools/vulkan-validation-layers { };
|
||||
|
Loading…
Reference in New Issue
Block a user