cmark: fix tests on darwin

Use DYLD_FALLBACK_LIBRARY_PATH to find the library.
This commit is contained in:
Sebastián Mancilla 2021-08-16 18:05:40 -04:00
parent 18c7c355fb
commit c977af0b02

View file

@ -19,10 +19,12 @@ stdenv.mkDerivation rec {
"-DCMARK_STATIC=OFF"
];
doCheck = !stdenv.isDarwin;
doCheck = true;
preCheck = ''
export LD_LIBRARY_PATH=$(readlink -f ./src)
preCheck = let
lib_path = if stdenv.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH" else "LD_LIBRARY_PATH";
in ''
export ${lib_path}=$(readlink -f ./src)
'';
meta = with lib; {