vulkan-loader: package headers, layers and demos

This commit is contained in:
David McFarland 2016-09-25 17:33:09 -03:00
parent 84c87dce2a
commit 8fe96a1926

View file

@ -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";