mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
vulkan-loader: package headers, layers and demos
This commit is contained in:
parent
84c87dce2a
commit
8fe96a1926
1 changed files with 13 additions and 4 deletions
|
@ -36,6 +36,8 @@ stdenv.mkDerivation rec {
|
|||
"-DBUILD_WSI_WAYLAND_SUPPORT=ON" # XLIB/XCB supported by default
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" "demos" ];
|
||||
|
||||
preConfigure = ''
|
||||
checkRev() {
|
||||
[ "$2" = $(cat "$1_revision") ] || (echo "ERROR: dependency $1 is revision $2 but should be revision" $(cat "$1_revision") && exit 1)
|
||||
|
@ -46,11 +48,18 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
mkdir -p $out/bin
|
||||
cp loader/libvulkan.so* $out/lib
|
||||
mkdir -p $out/lib $out/bin
|
||||
cp -d loader/libvulkan.so* $out/lib
|
||||
cp demos/vulkaninfo $out/bin
|
||||
'';
|
||||
mkdir -p $out/lib $out/etc/explicit_layer.d
|
||||
cp -d layers/*.so $out/lib/
|
||||
cp -d layers/*.json $out/etc/explicit_layer.d/
|
||||
sed -i "s:\\./lib:$out/lib/lib:g" "$out/etc/"**/*.json
|
||||
mkdir -p $dev/include
|
||||
cp -rv ../include $dev/
|
||||
mkdir -p $demos/bin
|
||||
cp demos/smoketest demos/tri demos/cube demos/*.spv demos/*.ppm $demos/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "LunarG Vulkan loader";
|
||||
|
|
Loading…
Reference in a new issue