diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/vulkan-loader')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix b/nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix new file mode 100644 index 000000000000..b1f2663e7f8f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchFromGitHub, cmake, python3, vulkan-headers, pkgconfig +, xlibsWrapper, libxcb, libXrandr, libXext, wayland, addOpenGLRunpath }: + +stdenv.mkDerivation rec { + pname = "vulkan-loader"; + version = "1.2.131.2"; + + src = fetchFromGitHub { + owner = "KhronosGroup"; + repo = "Vulkan-Loader"; + rev = "sdk-${version}"; + sha256 = "12n4mxc6db89258k8i47ql1zna7k94lkwv7lpxg39nm8ypa1ywrv"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ cmake python3 xlibsWrapper libxcb libXrandr libXext wayland ]; + enableParallelBuilding = true; + + preConfigure = '' + substituteInPlace loader/vulkan.pc.in --replace 'includedir=''${prefix}/include' 'includedir=${vulkan-headers}/include' + ''; + + cmakeFlags = [ + "-DSYSCONFDIR=${addOpenGLRunpath.driverLink}/share" + "-DVULKAN_HEADERS_INSTALL_DIR=${vulkan-headers}" + ]; + + outputs = [ "out" "dev" ]; + + meta = with stdenv.lib; { + description = "LunarG Vulkan loader"; + homepage = https://www.lunarg.com; + platforms = platforms.linux; + license = licenses.asl20; + maintainers = [ maintainers.ralith ]; + }; +} |