@@ -15,11 +15,15 @@ stdenv.mkDerivation rec {
1515 inherit sha256;
1616 };
1717
18− buildInputs = [ libaio python zlib ];
18+ buildInputs = [ python zlib ]
19+ ++ stdenv.lib.optional (!stdenv.isDarwin) libaio;
1920
2021 enableParallelBuilding = true;
2122
2223 postPatch = ''
24+ substituteInPlace Makefile \
25+ --replace "mandir = /usr/share/man" "mandir = \$(prefix)/man" \
26+ --replace "sharedir = /usr/share/fio" "sharedir = \$(prefix)/share/fio"
2327 substituteInPlace tools/plot/fio2gnuplot --replace /usr/share/fio $out/share/fio
2428 '';
2529