Skip to content
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

Merged
merged 2 commits into from Jun 13, 2018
Merged

ispell: fix compilation on Darwin #41951

merged 2 commits into from Jun 13, 2018

Conversation

smaret
Copy link
Member

@smaret smaret commented Jun 13, 2018

Motivation for this change

Fixes #41948.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg GrahamcOfBorg added the 6.topic: darwin Running or building packages on Darwin label Jun 13, 2018
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use optionalString

@@ -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
Copy link
Member

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
  '';
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion.

@LnL7
Copy link
Member

LnL7 commented Jun 13, 2018

@GrahamcOfBorg build ispell

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: ispell

Partial log (click to expand)

these paths will be fetched (0.32 MiB download, 3.45 MiB unpacked):
  /nix/store/lkwfz7pfb0jz974z437ff8hn8j5nps06-ispell-3.3.02
copying path '/nix/store/lkwfz7pfb0jz974z437ff8hn8j5nps06-ispell-3.3.02' from 'https://cache.nixos.org'...
/nix/store/lkwfz7pfb0jz974z437ff8hn8j5nps06-ispell-3.3.02

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: ispell

Partial log (click to expand)

these paths will be fetched (0.31 MiB download, 3.44 MiB unpacked):
  /nix/store/aj8dpg1l94hr2lhdphvd9xd9krva8r05-ispell-3.3.02
copying path '/nix/store/aj8dpg1l94hr2lhdphvd9xd9krva8r05-ispell-3.3.02' from 'https://cache.nixos.org'...
/nix/store/aj8dpg1l94hr2lhdphvd9xd9krva8r05-ispell-3.3.02

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: ispell

Partial log (click to expand)

+ rm -f english.hash
+ ln americanmed.hash english.hash
post-installation fixup
gzipping man pages under /nix/store/89apsqgvrz66hj4bx5pqz45ri8d5ylgg-ispell-3.3.02/share/man/
strip is /nix/store/yyak5sjv68n9vdgnkd2cb5djk1l9sqj5-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/89apsqgvrz66hj4bx5pqz45ri8d5ylgg-ispell-3.3.02/lib  /nix/store/89apsqgvrz66hj4bx5pqz45ri8d5ylgg-ispell-3.3.02/bin
patching script interpreter paths in /nix/store/89apsqgvrz66hj4bx5pqz45ri8d5ylgg-ispell-3.3.02
/nix/store/89apsqgvrz66hj4bx5pqz45ri8d5ylgg-ispell-3.3.02/bin/findaffix: interpreter directive changed from "/bin/sh" to "/nix/store/9gghkkqhn6v7dvpf2319qvrxkkw03vwr-bash-4.4-p19/bin/sh"
/nix/store/89apsqgvrz66hj4bx5pqz45ri8d5ylgg-ispell-3.3.02/bin/munchlist: interpreter directive changed from "/bin/sh" to "/nix/store/9gghkkqhn6v7dvpf2319qvrxkkw03vwr-bash-4.4-p19/bin/sh"
/nix/store/89apsqgvrz66hj4bx5pqz45ri8d5ylgg-ispell-3.3.02/bin/tryaffix: interpreter directive changed from "/bin/sh" to "/nix/store/9gghkkqhn6v7dvpf2319qvrxkkw03vwr-bash-4.4-p19/bin/sh"

Copy link
Member

@LnL7 LnL7 left a 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.

@LnL7 LnL7 merged commit 20d16d9 into NixOS:master Jun 13, 2018
@smaret smaret deleted the ispell branch June 13, 2018 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants