waifu2x-converter-cpp: fix darwin build

This commit is contained in:
Dmitry Kalinkin 2021-12-17 21:10:16 -05:00
parent 084faede55
commit ffdad422d0
No known key found for this signature in database
GPG Key ID: 5157B3EC8B2CA333

View File

@ -26,6 +26,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake makeWrapper ];
# main.cpp:498:12: error: 'is_directory' is unavailable: introduced in macOS 10.15
CXXFLAGS = lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") "-D_LIBCPP_DISABLE_AVAILABILITY";
preFixup = lib.optionalString stdenv.isLinux ''
wrapProgram $out/bin/waifu2x-converter-cpp --prefix LD_LIBRARY_PATH : "${ocl-icd}/lib"
'';