d2: fix inability to output images (#488723)
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
git,
|
||||
testers,
|
||||
d2,
|
||||
libgbm,
|
||||
makeWrapper,
|
||||
playwright-driver,
|
||||
}:
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
@@ -29,13 +32,25 @@ buildGoModule (finalAttrs: {
|
||||
"-X oss.terrastruct.com/d2/lib/version.Version=v${finalAttrs.version}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libgbm
|
||||
playwright-driver.browsers
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ git ];
|
||||
|
||||
postInstall = ''
|
||||
installManPage ci/release/template/man/d2.1
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [ git ];
|
||||
# Wrap the d2 executable to set LD_LIBRARY_PATH for Playwright
|
||||
wrapProgram $out/bin/d2 \
|
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs}
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
# See https://github.com/terrastruct/d2/blob/master/docs/CONTRIBUTING.md#running-tests.
|
||||
|
||||
Reference in New Issue
Block a user