18 stdenv.mkDerivation rec {
19 pname = "gfxreconstruct";
22 src = fetchFromGitHub {
24 repo = "gfxreconstruct";
26 hash = "sha256-MuCdJoBFxKwDCOCltlU3oBS9elFS6F251dHjHcIb4Jg=";
27 fetchSubmodules = true;
47 # The python script searches in subfolders, but we want to search in the same bin directory
49 substituteInPlace tools/gfxrecon/gfxrecon.py \
50 --replace "scriptdir, '..', cmd" 'scriptdir'
53 # Fix the paths to load the layer.
54 # Also remove the .py suffix on files so that gfxrecon
55 # does not try to start the wrapper bash scripts with python.
57 substituteInPlace $out/share/vulkan/explicit_layer.d/VkLayer_gfxreconstruct.json \
58 --replace 'libVkLayer_gfxreconstruct.so' "$out/lib/libVkLayer_gfxreconstruct.so"
59 for f in $out/bin/*.py; do
60 mv -- "$f" "''${f%%.py}"
62 wrapProgram $out/bin/gfxrecon-capture-vulkan \
63 --prefix VK_ADD_LAYER_PATH : "$out/share/vulkan/explicit_layer.d"
64 wrapProgram $out/bin/gfxrecon-replay \
65 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]}
69 description = "Graphics API Capture and Replay Tools";
70 homepage = "https://github.com/LunarG/gfxreconstruct/";
71 changelog = "https://github.com/LunarG/gfxreconstruct/releases/tag/v${version}";
72 license = licenses.mit;
73 maintainers = with maintainers; [ Flakebi ];
74 platforms = platforms.linux;