d2: disable playwright/libgbm on platforms where libdrm is unsupported (#514885)
This commit is contained in:
@@ -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,10 +47,11 @@ buildGoModule (finalAttrs: {
|
||||
|
||||
postInstall = ''
|
||||
installManPage ci/release/template/man/d2.1
|
||||
|
||||
# Wrap the d2 executable to set LD_LIBRARY_PATH for Playwright
|
||||
wrapProgram $out/bin/d2 \
|
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs}
|
||||
''
|
||||
# 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}
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
|
||||
Reference in New Issue
Block a user