From 0f8228bc40652c48325b3445760be20cc6c97992 Mon Sep 17 00:00:00 2001 From: summersamara Date: Sat, 23 Nov 2024 16:24:42 +0100 Subject: [PATCH] Try to fix issue on Darwin --- pkgs/by-name/vi/visual-hexdiff/package.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/vi/visual-hexdiff/package.nix b/pkgs/by-name/vi/visual-hexdiff/package.nix index eda76f08c3ed..b127f0869826 100644 --- a/pkgs/by-name/vi/visual-hexdiff/package.nix +++ b/pkgs/by-name/vi/visual-hexdiff/package.nix @@ -13,11 +13,6 @@ stdenv.mkDerivation { url = "mirror://ubuntu/pool/universe/h/hexdiff/hexdiff_0.0.53.orig.tar.gz"; hash = "sha256-M1bmkW63pHlfl9zNWEq0EGN1rpVGo+BTUKM9ot4HWqo="; }; - 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]);' - ''; patches = [ # Some changes the debian/ubuntu developers made over the original source code @@ -31,6 +26,16 @@ 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 *);' ' ' + ''; + buildInputs = [ ncurses ]; preInstall = ''