Commit 6246f64c authored by Robert Schütz's avatar Robert Schütz
Browse files

renderdoc: use lib.cmakeBool and lib.cmakeFeature

parent 5a7a587a
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ let
    rev = "renderdoc-modified-7";
    sha256 = "15r2m5kcs0id64pa2fsw58qll3jyh71jzc04wy20pgsh2326zis6";
  };
  cmakeBool = b: if b then "ON" else "OFF";
in
mkDerivation rec {
  pname = "renderdoc";
@@ -57,12 +56,12 @@ mkDerivation rec {
  '';

  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"
    "-DENABLE_WAYLAND=${cmakeBool waylandSupport}"
    (lib.cmakeFeature "BUILD_VERSION_HASH" src.rev)
    (lib.cmakeFeature "BUILD_VERSION_DIST_NAME" "NixOS")
    (lib.cmakeFeature "BUILD_VERSION_DIST_VER" version)
    (lib.cmakeFeature "BUILD_VERSION_DIST_CONTACT" "https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/graphics/renderdoc")
    (lib.cmakeBool "BUILD_VERSION_STABLE" true)
    (lib.cmakeBool "ENABLE_WAYLAND" waylandSupport)
  ];

  # TODO: define these in the above array via placeholders, once those are widely supported