renderdoc: use lib.cmakeBool and lib.cmakeFeature

This commit is contained in:
Robert Schütz 2024-09-18 20:44:57 -07:00
parent 5a7a587ad7
commit 6246f64c4e

View File

@ -28,7 +28,6 @@ let
rev = "renderdoc-modified-7"; rev = "renderdoc-modified-7";
sha256 = "15r2m5kcs0id64pa2fsw58qll3jyh71jzc04wy20pgsh2326zis6"; sha256 = "15r2m5kcs0id64pa2fsw58qll3jyh71jzc04wy20pgsh2326zis6";
}; };
cmakeBool = b: if b then "ON" else "OFF";
in in
mkDerivation rec { mkDerivation rec {
pname = "renderdoc"; pname = "renderdoc";
@ -57,12 +56,12 @@ mkDerivation rec {
''; '';
cmakeFlags = [ cmakeFlags = [
"-DBUILD_VERSION_HASH=${src.rev}" (lib.cmakeFeature "BUILD_VERSION_HASH" src.rev)
"-DBUILD_VERSION_DIST_NAME=NixOS" (lib.cmakeFeature "BUILD_VERSION_DIST_NAME" "NixOS")
"-DBUILD_VERSION_DIST_VER=${version}" (lib.cmakeFeature "BUILD_VERSION_DIST_VER" version)
"-DBUILD_VERSION_DIST_CONTACT=https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/graphics/renderdoc" (lib.cmakeFeature "BUILD_VERSION_DIST_CONTACT" "https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/graphics/renderdoc")
"-DBUILD_VERSION_STABLE=ON" (lib.cmakeBool "BUILD_VERSION_STABLE" true)
"-DENABLE_WAYLAND=${cmakeBool waylandSupport}" (lib.cmakeBool "ENABLE_WAYLAND" waylandSupport)
]; ];
# TODO: define these in the above array via placeholders, once those are widely supported # TODO: define these in the above array via placeholders, once those are widely supported