mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 15:44:20 +00:00
fd77cd7a01
Indentation conflict in vulkan-related src fetches.
46 lines
1.4 KiB
Nix
46 lines
1.4 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libX11, libxcb
|
|
, libXrandr, wayland, moltenvk, vulkan-headers, addOpenGLRunpath }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "vulkan-loader";
|
|
version = "1.3.243.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "KhronosGroup";
|
|
repo = "Vulkan-Loader";
|
|
rev = "sdk-${version}";
|
|
hash = "sha256-DqgIg0jZxzhoyYrATDQMoNN/Pav9deKdltB7L0XDqPE=";
|
|
};
|
|
|
|
patches = [ ./fix-pkgconfig.patch ];
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
buildInputs = [ vulkan-headers ]
|
|
++ lib.optionals (!stdenv.isDarwin) [ libX11 libxcb libXrandr wayland ];
|
|
|
|
cmakeFlags = [ "-DCMAKE_INSTALL_INCLUDEDIR=${vulkan-headers}/include" ]
|
|
++ lib.optional stdenv.isDarwin "-DSYSCONFDIR=${moltenvk}/share"
|
|
++ lib.optional stdenv.isLinux "-DSYSCONFDIR=${addOpenGLRunpath.driverLink}/share"
|
|
++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "-DUSE_GAS=OFF";
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
grep -q "${vulkan-headers}/include" $dev/lib/pkgconfig/vulkan.pc || {
|
|
echo vulkan-headers include directory not found in pkg-config file
|
|
exit 1
|
|
}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "LunarG Vulkan loader";
|
|
homepage = "https://www.lunarg.com";
|
|
platforms = platforms.unix;
|
|
license = licenses.asl20;
|
|
maintainers = [ maintainers.ralith ];
|
|
broken = (version != vulkan-headers.version);
|
|
};
|
|
}
|