2017-09-03 19:42:44 +01:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, pkgconfig
|
2018-07-14 21:00:27 +01:00
|
|
|
, qtbase, qtx11extras, qtsvg, makeWrapper
|
|
|
|
, vulkan-loader, xorg
|
|
|
|
, python36, bison, pcre, automake, autoconf
|
2017-03-21 20:36:26 +00:00
|
|
|
}:
|
2017-12-01 12:21:54 +00:00
|
|
|
let
|
2018-07-14 21:00:27 +01:00
|
|
|
custom_swig = fetchFromGitHub {
|
|
|
|
owner = "baldurk";
|
|
|
|
repo = "swig";
|
|
|
|
rev = "renderdoc-modified-5";
|
|
|
|
sha256 = "0ihrxbx56p5wn589fbbsns93fp91sypqdzfxdy7l7v9sf69a41mw";
|
2017-12-01 12:21:54 +00:00
|
|
|
};
|
|
|
|
in
|
2017-03-21 20:36:26 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-08-04 23:02:57 +01:00
|
|
|
version = "1.1";
|
2017-03-21 20:36:26 +00:00
|
|
|
name = "renderdoc-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "baldurk";
|
|
|
|
repo = "renderdoc";
|
2018-07-14 21:00:27 +01:00
|
|
|
rev = "v${version}";
|
2018-08-04 23:02:57 +01:00
|
|
|
sha256 = "0kb9m1dm0mnglqyh1srvl0f1bgjghxzbqarn0xfqw49wphqwhmcd";
|
2017-03-21 20:36:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2018-07-14 21:00:27 +01:00
|
|
|
qtbase qtsvg xorg.libpthreadstubs xorg.libXdmcp qtx11extras vulkan-loader python36
|
2017-03-21 20:36:26 +00:00
|
|
|
];
|
2017-12-01 12:21:54 +00:00
|
|
|
|
2018-07-14 21:00:27 +01:00
|
|
|
nativeBuildInputs = [ cmake makeWrapper pkgconfig bison pcre automake autoconf ];
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
cp -r ${custom_swig} swig
|
|
|
|
chmod -R +w swig
|
|
|
|
patchShebangs swig/autogen.sh
|
|
|
|
'';
|
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"
|
2018-07-14 21:00:27 +01:00
|
|
|
"-DBUILD_VERSION_DIST_VER=${version}"
|
2017-09-03 19:42:44 +01:00
|
|
|
"-DBUILD_VERSION_DIST_CONTACT=https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/graphics/renderdoc"
|
2018-07-14 21:00:27 +01:00
|
|
|
"-DBUILD_VERSION_STABLE=ON"
|
|
|
|
# TODO: add once pyside2 is in nixpkgs
|
|
|
|
#"-DPYSIDE2_PACKAGE_DIR=${python36Packages.pyside2}"
|
2017-03-21 20:36:26 +00:00
|
|
|
];
|
2017-12-01 12:21:54 +00:00
|
|
|
|
2018-07-14 21:00:27 +01:00
|
|
|
# Future work: define these in the above array via placeholders
|
2017-03-21 20:36:26 +00:00
|
|
|
preConfigure = ''
|
|
|
|
cmakeFlags+=" -DVULKAN_LAYER_FOLDER=$out/share/vulkan/implicit_layer.d/"
|
2018-07-14 21:00:27 +01:00
|
|
|
cmakeFlags+=" -DRENDERDOC_SWIG_PACKAGE=$PWD/../swig"
|
2017-03-21 20:36:26 +00:00
|
|
|
'';
|
2017-09-03 19:42:44 +01:00
|
|
|
|
2017-03-21 20:36:26 +00:00
|
|
|
preFixup = ''
|
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
|
|
|
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
|
|
|
|
2017-03-21 20:36:26 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|