Commit 2649f869 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt
Browse files

d2: disable playwright/libgbm on platforms where libdrm is unsupported

parent 605c990d
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
  git,
  testers,
  d2,
  libdrm,
  libgbm,
  makeWrapper,
  playwright-driver,
@@ -37,7 +38,7 @@ buildGoModule (finalAttrs: {
    makeWrapper
  ];

  buildInputs = [
  buildInputs = lib.optionals libdrm.meta.available [
    libgbm
    playwright-driver.browsers
  ];
@@ -46,8 +47,9 @@ buildGoModule (finalAttrs: {

  postInstall = ''
    installManPage ci/release/template/man/d2.1

  ''
  # Wrap the d2 executable to set LD_LIBRARY_PATH for Playwright
  + lib.optionalString (finalAttrs.buildInputs != [ ]) ''
    wrapProgram $out/bin/d2 \
      --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs}
  '';