at 18.03-beta 85 lines 2.8 kB view raw
1{ stdenv, fetchFromGitHub, cmake, pkgconfig 2, qtbase, qtx11extras, qtsvg, makeWrapper, python3, bison 3, pcre, vulkan-loader, xorg, autoreconfHook 4}: 5 6let 7 custom_swig = stdenv.mkDerivation { 8 name = "renderdoc-custom-swig"; 9 src = fetchFromGitHub { 10 owner = "baldurk"; 11 repo = "swig"; 12 rev = "renderdoc-modified-1"; 13 sha256 = "1whymd3vamwnp4jqfc9asls3dw9wsdi21xhm1d2a4vx9nql8if1x"; 14 }; 15 16 nativeBuildInputs = [ autoreconfHook pcre ]; 17 18 autoreconfPhase = '' 19 patchShebangs autogen.sh 20 ./autogen.sh 21 ''; 22 }; 23in 24stdenv.mkDerivation rec { 25 name = "renderdoc-${version}"; 26 version = "0.91"; 27 28 src = fetchFromGitHub { 29 owner = "baldurk"; 30 repo = "renderdoc"; 31 rev = "2d8b2cf818746b6a2add54e2fef449398816a40c"; 32 sha256 = "07yc3fk7j2nqmrhc4dm3v2pgbc37scd7d28nlzk6v0hw99zck8k0"; 33 }; 34 35 buildInputs = [ 36 qtbase qtsvg xorg.libpthreadstubs xorg.libXdmcp qtx11extras vulkan-loader 37 ]; 38 39 nativeBuildInputs = [ cmake makeWrapper pkgconfig python3 bison ]; 40 41 cmakeFlags = [ 42 "-DBUILD_VERSION_HASH=${src.rev}" 43 "-DBUILD_VERSION_DIST_NAME=NixOS" 44 "-DBUILD_VERSION_DIST_VER=0.91" 45 "-DBUILD_VERSION_DIST_CONTACT=https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/graphics/renderdoc" 46 "-DBUILD_VERSION_DIST_STABLE=ON" 47 # TODO: use this instead of preConfigure once placeholders land 48 #"-DVULKAN_LAYER_FOLDER=${placeholder out}/share/vulkan/implicit_layer.d/" 49 ]; 50 51 preConfigure = '' 52 cmakeFlags+=" -DVULKAN_LAYER_FOLDER=$out/share/vulkan/implicit_layer.d/" 53 ''; 54 55 preFixup = '' 56 mkdir $out/bin/.bin 57 mv $out/bin/qrenderdoc $out/bin/.bin/qrenderdoc 58 ln -s $out/bin/.bin/qrenderdoc $out/bin/qrenderdoc 59 wrapProgram $out/bin/qrenderdoc --suffix LD_LIBRARY_PATH : $out/lib --suffix LD_LIBRARY_PATH : ${vulkan-loader}/lib 60 mv $out/bin/renderdoccmd $out/bin/.bin/renderdoccmd 61 ln -s $out/bin/.bin/renderdoccmd $out/bin/renderdoccmd 62 wrapProgram $out/bin/renderdoccmd --suffix LD_LIBRARY_PATH : $out/lib --suffix LD_LIBRARY_PATH : ${vulkan-loader}/lib 63 ''; 64 65 # Set path to custom swig binary 66 NIXOS_CUSTOM_SWIG = "${custom_swig}/bin/swig"; 67 68 enableParallelBuilding = true; 69 70 patches = [ ./custom_swig.patch ]; 71 72 meta = with stdenv.lib; { 73 description = "A single-frame graphics debugger"; 74 homepage = https://renderdoc.org/; 75 license = licenses.mit; 76 longDescription = '' 77 RenderDoc is a free MIT licensed stand-alone graphics debugger that 78 allows quick and easy single-frame capture and detailed introspection 79 of any application using Vulkan, D3D11, OpenGL or D3D12 across 80 Windows 7 - 10, Linux or Android. 81 ''; 82 maintainers = [maintainers.jansol]; 83 platforms = ["i686-linux" "x86_64-linux"]; 84 }; 85}