depot/third_party/nixpkgs/pkgs/tools/graphics/vkbasalt/default.nix
Default email a66bca1520 Project import generated by Copybara.
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
2022-12-17 11:02:37 +01:00

43 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, glslang
, meson
, ninja
, pkg-config
, libX11
, spirv-headers
, vulkan-headers
, vkbasalt32
}:
stdenv.mkDerivation rec {
pname = "vkbasalt";
version = "0.3.2.8";
src = fetchFromGitHub {
owner = "DadSchoorse";
repo = pname;
rev = "v${version}";
hash = "sha256-/ynJ6zOVj6Si23Jsq6IHlw36KqBtMvjj41fos6irm9o=";
};
nativeBuildInputs = [ glslang meson ninja pkg-config ];
buildInputs = [ libX11 spirv-headers vulkan-headers ];
mesonFlags = [ "-Dappend_libdir_vkbasalt=true" ];
postInstall = lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
install -Dm 644 $src/config/vkBasalt.conf $out/share/vkBasalt/vkBasalt.conf
# Include 32bit layer in 64bit build
ln -s ${vkbasalt32}/share/vulkan/implicit_layer.d/vkBasalt.json \
"$out/share/vulkan/implicit_layer.d/vkBasalt32.json"
'';
meta = with lib; {
description = "A Vulkan post processing layer for Linux";
homepage = "https://github.com/DadSchoorse/vkBasalt";
license = licenses.zlib;
maintainers = with maintainers; [ kira-bruneau ];
platforms = platforms.linux;
};
}