Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

102 lines
2.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
python3,
jq,
expat,
jsoncpp,
libX11,
libXdmcp,
libXrandr,
libffi,
libxcb,
pkg-config,
wayland,
which,
xcbutilkeysyms,
xcbutilwm,
valijson,
vulkan-headers,
vulkan-loader,
vulkan-utility-libraries,
writeText,
libsForQt5,
}:
stdenv.mkDerivation rec {
pname = "vulkan-tools-lunarg";
version = "1.3.296.0";
src = fetchFromGitHub {
owner = "LunarG";
repo = "VulkanTools";
rev = "vulkan-sdk-${version}";
hash = "sha256-RaL7sqy5Rc8syPoM3SedZ6UilV9JUAA96JZh5/gIfPU=";
};
nativeBuildInputs = [
cmake
python3
jq
which
pkg-config
libsForQt5.qt5.wrapQtAppsHook
];
buildInputs = [
expat
jsoncpp
libX11
libXdmcp
libXrandr
libffi
libxcb
valijson
vulkan-headers
vulkan-loader
vulkan-utility-libraries
wayland
xcbutilkeysyms
xcbutilwm
libsForQt5.qt5.qtbase
libsForQt5.qt5.qtwayland
];
cmakeFlags = [
"-DVULKAN_HEADERS_INSTALL_DIR=${vulkan-headers}"
];
preConfigure = ''
patchShebangs scripts/*
substituteInPlace via/CMakeLists.txt --replace "jsoncpp_static" "jsoncpp"
'';
# Include absolute paths to layer libraries in their associated
# layer definition json files.
preFixup = ''
for f in "$out"/etc/vulkan/explicit_layer.d/*.json "$out"/etc/vulkan/implicit_layer.d/*.json; do
jq <"$f" >tmp.json ".layer.library_path = \"$out/lib/\" + .layer.library_path"
mv tmp.json "$f"
done
'';
# Help vulkan-loader find the validation layers
setupHook = writeText "setup-hook" ''
export XDG_CONFIG_DIRS=@out@/etc''${XDG_CONFIG_DIRS:+:''${XDG_CONFIG_DIRS}}
'';
meta = with lib; {
description = "LunarG Vulkan Tools and Utilities";
longDescription = ''
Tools to aid in Vulkan development including useful layers, trace and
replay, and tests.
'';
homepage = "https://github.com/LunarG/VulkanTools";
platforms = platforms.linux;
license = licenses.asl20;
maintainers = [ ];
};
}