diff --git a/pkgs/by-name/vi/visual-hexdiff/package.nix b/pkgs/by-name/vi/visual-hexdiff/package.nix index b127f0869826..3e374ae7d997 100644 --- a/pkgs/by-name/vi/visual-hexdiff/package.nix +++ b/pkgs/by-name/vi/visual-hexdiff/package.nix @@ -26,15 +26,17 @@ stdenv.mkDerivation { }) ]; - postPatch = '' - # Fix compiler error that wants a string literal as format string for `wprintw` - substituteInPlace sel_file.c \ - --replace-fail 'wprintw(win, txt_aide_fs[foo]);' 'wprintw(win, "%s", txt_aide_fs[foo]);' - '' + lib.optionalString stdenv.hostPlatform.isDarwin '' - # Fix compiler error on Darwin: conflicting types for 'strdup' - substituteInPlace sel_file.c \ - --replace-fail 'char *strdup(char *);' ' ' - ''; + postPatch = + '' + # Fix compiler error that wants a string literal as format string for `wprintw` + substituteInPlace sel_file.c \ + --replace-fail 'wprintw(win, txt_aide_fs[foo]);' 'wprintw(win, "%s", txt_aide_fs[foo]);' + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + # Fix compiler error on Darwin: conflicting types for 'strdup' + substituteInPlace sel_file.c \ + --replace-fail 'char *strdup(char *);' ' ' + ''; buildInputs = [ ncurses ];