Skip to content

Commit 97a6b07

Browse files
committed
Avoid broken symlinks in haddock derivations
Needed for cardano-scaling/hydra#2033
1 parent dc76b5a commit 97a6b07

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

builder/haddock-builder.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,12 @@ let
151151
${ghc.targetPrefix}ghc-pkg -v0 --package-db $configFiles/${configFiles.packageCfgDir} -f $out/package.conf.d register "$pkg"
152152
done
153153
154-
ln -s ${componentDrv}/exactDep $out/exactDep
155-
ln -s ${componentDrv}/envDep $out/envDep
154+
if [ -d ${componentDrv}/exactDep ]; then
155+
ln -s ${componentDrv}/exactDep $out/exactDep
156+
fi
157+
if [ -f ${componentDrv}/envDep ]; then
158+
ln -s ${componentDrv}/envDep $out/envDep
159+
fi
156160
'';
157161
}
158162
// haskellLib.optionalHooks {

0 commit comments

Comments
 (0)