New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ispell: fix compilation on Darwin #41951
Conversation
pkgs/tools/text/ispell/default.nix
Outdated
@@ -22,8 +22,8 @@ stdenv.mkDerivation rec { | |||
./patches/0030-Display-whole-multibyte-character.patch | |||
]; | |||
postPatch = '' | |||
if [ ! stdenv.isDarwin ]; then echo "#define USG" >> local.h; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use optionalString
pkgs/tools/text/ispell/default.nix
Outdated
@@ -22,8 +22,8 @@ stdenv.mkDerivation rec { | |||
./patches/0030-Display-whole-multibyte-character.patch | |||
]; | |||
postPatch = '' | |||
if [ ! stdenv.isDarwin ]; then echo "#define USG" >> local.h; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that conditional isn't available in bash, you want something like this
{
postPatch = ''
cat >> local.h <<EOF
${stdenv.lib.optionalString (!stdenv.isDarwin) "#define USG"}
#define TERMLIB "-lncurses"
...
EOF
'';
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion.
@GrahamcOfBorg build ispell |
Success on x86_64-linux (full log) Attempted: ispell Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: ispell Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: ispell Partial log (click to expand)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now, doesn't even change the linux build.
Motivation for this change
Fixes #41948.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)