Try to fix issue on Darwin

This commit is contained in:
summersamara
2024-11-23 16:24:42 +01:00
parent 7caf0ad318
commit 0f8228bc40
+10 -5
View File
@@ -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 = ''