mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-08 05:54:24 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
44 lines
1011 B
Nix
44 lines
1011 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, vulkan-headers
|
|
, glfw
|
|
, catch2
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "vk-bootstrap";
|
|
version = "0.7";
|
|
outputs = [ "out" "dev" ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "charles-lunarg";
|
|
repo = "vk-bootstrap";
|
|
rev = "v${version}";
|
|
hash = "sha256-X3ANqfplrCF1R494+H5/plcwMH7rbW6zpLA4MZrYaoE=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|