2017-09-03 19:42:44 +01:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, pkgconfig
|
|
|
|
, qtbase, qtx11extras, qtsvg, makeWrapper, python3, bison
|
2017-12-01 12:21:54 +00:00
|
|
|
, pcre, vulkan-loader, xorg, autoreconfHook
|
2017-03-21 20:36:26 +00:00
|
|
|
}:
|
|
|
|
|
2017-12-01 12:21:54 +00:00
|
|
|
let
|
|
|
|
custom_swig = stdenv.mkDerivation {
|
|
|
|
name = "renderdoc-custom-swig";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "baldurk";
|
|
|
|
repo = "swig";
|
|
|
|
rev = "renderdoc-modified-1";
|
|
|
|
sha256 = "1whymd3vamwnp4jqfc9asls3dw9wsdi21xhm1d2a4vx9nql8if1x";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook pcre ];
|
|
|
|
|
|
|
|
autoreconfPhase = ''
|
|
|
|
patchShebangs autogen.sh
|
|
|
|
./autogen.sh
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in
|
2017-03-21 20:36:26 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "renderdoc-${version}";
|
2017-09-03 19:42:44 +01:00
|
|
|
version = "0.91";
|
2017-03-21 20:36:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "baldurk";
|
|
|
|
repo = "renderdoc";
|
2017-09-03 19:42:44 +01:00
|
|
|
rev = "2d8b2cf818746b6a2add54e2fef449398816a40c";
|
|
|
|
sha256 = "07yc3fk7j2nqmrhc4dm3v2pgbc37scd7d28nlzk6v0hw99zck8k0";
|
2017-03-21 20:36:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2017-09-03 19:42:44 +01:00
|
|
|
qtbase qtsvg xorg.libpthreadstubs xorg.libXdmcp qtx11extras vulkan-loader
|
2017-03-21 20:36:26 +00:00
|
|
|
];
|
2017-12-01 12:21:54 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake makeWrapper pkgconfig python3 bison ];
|
2017-03-21 20:36:26 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
2017-09-03 19:42:44 +01:00
|
|
|
"-DBUILD_VERSION_HASH=${src.rev}"
|
|
|
|
"-DBUILD_VERSION_DIST_NAME=NixOS"
|
|
|
|
"-DBUILD_VERSION_DIST_VER=0.91"
|
|
|
|
"-DBUILD_VERSION_DIST_CONTACT=https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/graphics/renderdoc"
|
|
|
|
"-DBUILD_VERSION_DIST_STABLE=ON"
|
2017-03-21 20:36:26 +00:00
|
|
|
# TODO: use this instead of preConfigure once placeholders land
|
|
|
|
#"-DVULKAN_LAYER_FOLDER=${placeholder out}/share/vulkan/implicit_layer.d/"
|
|
|
|
];
|
2017-12-01 12:21:54 +00:00
|
|
|
|
2017-03-21 20:36:26 +00:00
|
|
|
preConfigure = ''
|
|
|
|
cmakeFlags+=" -DVULKAN_LAYER_FOLDER=$out/share/vulkan/implicit_layer.d/"
|
|
|
|
'';
|
2017-09-03 19:42:44 +01:00
|
|
|
|
2017-03-21 20:36:26 +00:00
|
|
|
preFixup = ''
|
|
|
|
mkdir $out/bin/.bin
|
|
|
|
mv $out/bin/qrenderdoc $out/bin/.bin/qrenderdoc
|
|
|
|
ln -s $out/bin/.bin/qrenderdoc $out/bin/qrenderdoc
|
2017-05-17 20:26:11 +01:00
|
|
|
wrapProgram $out/bin/qrenderdoc --suffix LD_LIBRARY_PATH : $out/lib --suffix LD_LIBRARY_PATH : ${vulkan-loader}/lib
|
2017-03-21 20:36:26 +00:00
|
|
|
mv $out/bin/renderdoccmd $out/bin/.bin/renderdoccmd
|
|
|
|
ln -s $out/bin/.bin/renderdoccmd $out/bin/renderdoccmd
|
|
|
|
wrapProgram $out/bin/renderdoccmd --suffix LD_LIBRARY_PATH : $out/lib --suffix LD_LIBRARY_PATH : ${vulkan-loader}/lib
|
|
|
|
'';
|
2017-12-01 12:21:54 +00:00
|
|
|
|
|
|
|
# Set path to custom swig binary
|
|
|
|
NIXOS_CUSTOM_SWIG = "${custom_swig}/bin/swig";
|
|
|
|
|
2017-03-21 20:36:26 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-12-01 12:21:54 +00:00
|
|
|
patches = [ ./custom_swig.patch ];
|
|
|
|
|
2017-03-21 20:36:26 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A single-frame graphics debugger";
|
|
|
|
homepage = https://renderdoc.org/;
|
|
|
|
license = licenses.mit;
|
|
|
|
longDescription = ''
|
|
|
|
RenderDoc is a free MIT licensed stand-alone graphics debugger that
|
|
|
|
allows quick and easy single-frame capture and detailed introspection
|
|
|
|
of any application using Vulkan, D3D11, OpenGL or D3D12 across
|
|
|
|
Windows 7 - 10, Linux or Android.
|
|
|
|
'';
|
|
|
|
maintainers = [maintainers.jansol];
|
2017-09-03 19:42:44 +01:00
|
|
|
platforms = ["i686-linux" "x86_64-linux"];
|
2017-03-21 20:36:26 +00:00
|
|
|
};
|
|
|
|
}
|