diff options
author | Joe Hermaszewski <git@monoid.al> | 2020-11-20 01:07:46 +0800 |
---|---|---|
committer | Joe Hermaszewski <git@monoid.al> | 2020-11-20 15:25:26 +0800 |
commit | c8d117125473ef369803daa689a4d68cf6bd293d (patch) | |
tree | 115d858a93ebcb9704078c1331b2c3e8573fb380 | |
parent | 4718ba1ab10d109e2383854c5c56c2c2340c00c1 (diff) |
vulkan-extension-layer: init at 2020-08-25
There are no tags or releases on the repo, so just use the date as version.
Khronos strikes again with terrible naming here.
-rw-r--r-- | pkgs/tools/graphics/vulkan-extension-layer/default.nix | 39 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/tools/graphics/vulkan-extension-layer/default.nix b/pkgs/tools/graphics/vulkan-extension-layer/default.nix new file mode 100644 index 000000000000..cea582851e49 --- /dev/null +++ b/pkgs/tools/graphics/vulkan-extension-layer/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, cmake, writeText, vulkan-headers, jq }: + +stdenv.mkDerivation rec { + pname = "vulkan-extension-layer"; + version = "2020-08-25"; + + src = fetchFromGitHub { + owner = "KhronosGroup"; + repo = "Vulkan-ExtensionLayer"; + rev = "352f8e3e269ff2c650da50ce36313547c2a1fbb6"; + sha256 = "1503z1zj1xvjpry2h7fpg1frx7lcm54zs3azcgiv5i3ar4wqfkz9"; + }; + + nativeBuildInputs = [ cmake jq ]; + + buildInputs = [ vulkan-headers ]; + + # Help vulkan-loader find the validation layers + setupHook = writeText "setup-hook" '' + export XDG_DATA_DIRS=@out@/share:$XDG_DATA_DIRS + ''; + + # Include absolute paths to layer libraries in their associated + # layer definition json files. + preFixup = '' + for f in "$out"/share/vulkan/explicit_layer.d/*.json "$out"/share/vulkan/implicit_layer.d/*.json; do + jq <"$f" >tmp.json ".layer.library_path = \"$out/lib/\" + .layer.library_path" + mv tmp.json "$f" + done + ''; + + meta = with stdenv.lib; { + description = "Layers providing Vulkan features when native support is unavailable"; + homepage = "https://github.com/KhronosGroup/Vulkan-ExtensionLayer/"; + platforms = platforms.linux; + license = licenses.asl20; + maintainers = with maintainers; [ expipiplus1 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8c96a8b961a2..c9586dae594e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16160,6 +16160,7 @@ in CoreText IOSurface ImageIO OpenGL GLUT; }; + vulkan-extension-layer = callPackage ../tools/graphics/vulkan-extension-layer { }; vulkan-headers = callPackage ../development/libraries/vulkan-headers { }; vulkan-loader = callPackage ../development/libraries/vulkan-loader { }; vulkan-tools = callPackage ../tools/graphics/vulkan-tools { }; |