From 561232db155676bf6961358cfff4bf418e8d94cb Mon Sep 17 00:00:00 2001 From: summersamara Date: Sat, 23 Nov 2024 16:51:37 +0100 Subject: [PATCH] fix format --- pkgs/by-name/vi/visual-hexdiff/package.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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 ];