depot/third_party/nixpkgs/pkgs/development/libraries/vk-bootstrap/default.nix
Default email 92b3d6365d Project import generated by Copybara.
GitOrigin-RevId: 412b9917cea092f3d39f9cd5dead4effd5bc4053
2022-10-30 16:09:59 +01:00

43 lines
1,013 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, vulkan-headers
, glfw
, catch2
}:
stdenv.mkDerivation rec {
pname = "vk-bootstrap";
version = "0.5";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "charles-lunarg";
repo = "vk-bootstrap";
rev = "v${version}";
sha256 = "sha256-rKyfUWfRYiVNzLWh6y44ASHW4j+yabY0kZTdZi8j2Dc=";
};
postPatch = ''
# Upstream uses cmake FetchContent to resolve glfw and catch2
# needed for examples and tests
sed -iE 's=add_subdirectory(ext)==g' CMakeLists.txt
sed -iE 's=Catch2==g' tests/CMakeLists.txt
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ vulkan-headers glfw catch2 ];
cmakeFlags = [
"-DVK_BOOTSTRAP_VULKAN_HEADER_DIR=${vulkan-headers}/include"
];
meta = with lib; {
description = "Vulkan Bootstrapping Library";
license = licenses.mit;
homepage = "https://github.com/charles-lunarg/vk-bootstrap";
maintainers = with maintainers; [ shamilton ];
platforms = platforms.all;
};
}