@@ -137,9 +137,16 @@ let
137137 url = "https://github.com/keplerproject/luafilesystem/archive/v1_6_2.tar.gz";
138138 sha256 = "134azkxw84xp9g5qmzjsmcva629jm7plwcmjxkdzdg05vyd7kig1";
139139 };
140+ preConfigure = "substituteInPlace config --replace 'CC= gcc' '';"
141+ + stdenv.lib.optionalString stdenv.isDarwin ''
142+ substituteInPlace config \
143+ --replace 'LIB_OPTION= -shared' '###' \
144+ --replace '#LIB_OPTION= -bundle' 'LIB_OPTION= -bundle'
145+ substituteInPlace Makefile --replace '10.3' '10.5'
146+ '';
140147 meta = {
141148 homepage = "https://github.com/keplerproject/luafilesystem";
142− hydraPlatforms = stdenv.lib.platforms.linux;
149+ hydraPlatforms = stdenv.lib.platforms.unix;
143150 maintainers = with maintainers; [ flosse ];
144151 };
145152 };