2022-01-19 23:45:15 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nix-update-script
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, mkDerivation
|
|
|
|
, qtbase
|
|
|
|
, qtx11extras
|
|
|
|
, qtsvg
|
|
|
|
, makeWrapper
|
|
|
|
, vulkan-loader
|
|
|
|
, libglvnd
|
|
|
|
, xorg
|
|
|
|
, python3
|
|
|
|
, python3Packages
|
|
|
|
, bison
|
|
|
|
, pcre
|
|
|
|
, automake
|
|
|
|
, autoconf
|
|
|
|
, addOpenGLRunpath
|
|
|
|
, waylandSupport ? false
|
|
|
|
, wayland
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
custom_swig = fetchFromGitHub {
|
|
|
|
owner = "baldurk";
|
|
|
|
repo = "swig";
|
|
|
|
rev = "renderdoc-modified-7";
|
|
|
|
sha256 = "15r2m5kcs0id64pa2fsw58qll3jyh71jzc04wy20pgsh2326zis6";
|
|
|
|
};
|
2021-08-05 21:33:18 +00:00
|
|
|
cmakeBool = b: if b then "ON" else "OFF";
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "renderdoc";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.33";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "baldurk";
|
|
|
|
repo = "renderdoc";
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
sha256 = "sha256-BQR7ENgdblzamO5GgtLJriNiJFICsj0/iWVn1usxBjU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
qtbase qtsvg xorg.libpthreadstubs xorg.libXdmcp qtx11extras vulkan-loader python3
|
2022-12-02 08:20:57 +00:00
|
|
|
] ++ (with python3Packages; [
|
|
|
|
pyside2 pyside2-tools shiboken2
|
|
|
|
])
|
2021-08-05 21:33:18 +00:00
|
|
|
++ lib.optional waylandSupport wayland;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake makeWrapper pkg-config bison pcre automake autoconf addOpenGLRunpath ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
cp -r ${custom_swig} swig
|
|
|
|
chmod -R +w swig
|
|
|
|
patchShebangs swig/autogen.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_VERSION_HASH=${src.rev}"
|
|
|
|
"-DBUILD_VERSION_DIST_NAME=NixOS"
|
|
|
|
"-DBUILD_VERSION_DIST_VER=${version}"
|
|
|
|
"-DBUILD_VERSION_DIST_CONTACT=https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/graphics/renderdoc"
|
|
|
|
"-DBUILD_VERSION_STABLE=ON"
|
2021-08-05 21:33:18 +00:00
|
|
|
"-DENABLE_WAYLAND=${cmakeBool waylandSupport}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# TODO: define these in the above array via placeholders, once those are widely supported
|
|
|
|
preConfigure = ''
|
|
|
|
cmakeFlags+=" -DVULKAN_LAYER_FOLDER=$out/share/vulkan/implicit_layer.d/"
|
|
|
|
cmakeFlags+=" -DRENDERDOC_SWIG_PACKAGE=$PWD/../swig"
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
preFixup = ''
|
|
|
|
wrapQtApp $out/bin/qrenderdoc --suffix LD_LIBRARY_PATH : "$out/lib:${vulkan-loader}/lib:${libglvnd}/lib"
|
|
|
|
wrapProgram $out/bin/renderdoccmd --suffix LD_LIBRARY_PATH : "$out/lib:${vulkan-loader}/lib:${libglvnd}/lib"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# The only documentation for this so far is in pkgs/build-support/add-opengl-runpath/setup-hook.sh
|
|
|
|
postFixup = ''
|
|
|
|
addOpenGLRunpath $out/lib/librenderdoc.so
|
|
|
|
'';
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Single-frame graphics debugger";
|
2020-04-24 23:36:52 +00:00
|
|
|
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.
|
|
|
|
'';
|
2022-08-12 12:06:08 +00:00
|
|
|
maintainers = [ ];
|
2021-08-05 21:33:18 +00:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|