storj-uplink: 1.119.8 -> 1.119.15 (#372175)
[NixPkgs.git] / pkgs / by-name / vu / vulkan-tools-lunarg / package.nix
blobe8bac27836ebdc7b4f7b2954ee8d442dfc27eb9b
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   cmake,
6   python3,
7   jq,
8   expat,
9   jsoncpp,
10   libX11,
11   libXdmcp,
12   libXrandr,
13   libffi,
14   libxcb,
15   pkg-config,
16   wayland,
17   which,
18   xcbutilkeysyms,
19   xcbutilwm,
20   valijson,
21   vulkan-headers,
22   vulkan-loader,
23   vulkan-utility-libraries,
24   writeText,
25   libsForQt5,
28 stdenv.mkDerivation rec {
29   pname = "vulkan-tools-lunarg";
30   version = "1.3.296.0";
32   src = fetchFromGitHub {
33     owner = "LunarG";
34     repo = "VulkanTools";
35     rev = "vulkan-sdk-${version}";
36     hash = "sha256-RaL7sqy5Rc8syPoM3SedZ6UilV9JUAA96JZh5/gIfPU=";
37   };
39   nativeBuildInputs = [
40     cmake
41     python3
42     jq
43     which
44     pkg-config
45     libsForQt5.qt5.wrapQtAppsHook
46   ];
48   buildInputs = [
49     expat
50     jsoncpp
51     libX11
52     libXdmcp
53     libXrandr
54     libffi
55     libxcb
56     valijson
57     vulkan-headers
58     vulkan-loader
59     vulkan-utility-libraries
60     wayland
61     xcbutilkeysyms
62     xcbutilwm
63     libsForQt5.qt5.qtbase
64     libsForQt5.qt5.qtwayland
65   ];
67   cmakeFlags = [
68     "-DVULKAN_HEADERS_INSTALL_DIR=${vulkan-headers}"
69   ];
71   preConfigure = ''
72     patchShebangs scripts/*
73     substituteInPlace via/CMakeLists.txt --replace "jsoncpp_static" "jsoncpp"
74   '';
76   # Include absolute paths to layer libraries in their associated
77   # layer definition json files.
78   preFixup = ''
79     for f in "$out"/etc/vulkan/explicit_layer.d/*.json "$out"/etc/vulkan/implicit_layer.d/*.json; do
80       jq <"$f" >tmp.json ".layer.library_path = \"$out/lib/\" + .layer.library_path"
81       mv tmp.json "$f"
82     done
83   '';
85   # Help vulkan-loader find the validation layers
86   setupHook = writeText "setup-hook" ''
87     export XDG_CONFIG_DIRS=@out@/etc''${XDG_CONFIG_DIRS:+:''${XDG_CONFIG_DIRS}}
88   '';
90   meta = with lib; {
91     description = "LunarG Vulkan Tools and Utilities";
92     longDescription = ''
93       Tools to aid in Vulkan development including useful layers, trace and
94       replay, and tests.
95     '';
96     homepage = "https://github.com/LunarG/VulkanTools";
97     platforms = platforms.linux;
98     license = licenses.asl20;
99     maintainers = [ ];
100   };