nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 50 lines 1.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 vulkan-headers, 7 glfw, 8 catch2, 9}: 10 11stdenv.mkDerivation (finalAttrs: { 12 pname = "vk-bootstrap"; 13 version = "0.7"; 14 outputs = [ 15 "out" 16 "dev" 17 ]; 18 19 src = fetchFromGitHub { 20 owner = "charles-lunarg"; 21 repo = "vk-bootstrap"; 22 rev = "v${finalAttrs.version}"; 23 hash = "sha256-X3ANqfplrCF1R494+H5/plcwMH7rbW6zpLA4MZrYaoE="; 24 }; 25 26 postPatch = '' 27 # Upstream uses cmake FetchContent to resolve glfw and catch2 28 # needed for examples and tests 29 sed -i 's=add_subdirectory(ext)==g' CMakeLists.txt 30 sed -i 's=Catch2==g' tests/CMakeLists.txt 31 ''; 32 33 nativeBuildInputs = [ cmake ]; 34 buildInputs = [ 35 vulkan-headers 36 glfw 37 catch2 38 ]; 39 40 cmakeFlags = [ 41 "-DVK_BOOTSTRAP_VULKAN_HEADER_DIR=${vulkan-headers}/include" 42 ]; 43 44 meta = { 45 description = "Vulkan Bootstrapping Library"; 46 license = lib.licenses.mit; 47 homepage = "https://github.com/charles-lunarg/vk-bootstrap"; 48 platforms = lib.platforms.all; 49 }; 50})