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

hunspell-hs: fix build #45633

Merged
merged 1 commit into from Aug 26, 2018
Merged

hunspell-hs: fix build #45633

merged 1 commit into from Aug 26, 2018

Conversation

typetetris
Copy link
Contributor

There is no library hunspell, but hunspell-1.6,
hunspell-1.4 (not in nixpkgs), and so on.

Disables tests as some necessary data files
aren't included on hackage.

Motivation for this change

Get hunspell-hs building again.

Things done

Fixed extra-libraries and disabled tests.

  • 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@typetetris
Copy link
Contributor Author

Trying to upstream things here ashutoshrishi/hunspell-hs#3

@jtojnar
Copy link
Contributor

jtojnar commented Aug 25, 2018

Maybe they could use pkgconfig-depends. That seems to be more predictable.

@basvandijk
Copy link
Member

@GrahamcOfBorg build haskellPackages.hunspell-hs

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: haskellPackages.hunspell-hs

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: haskellPackages.hunspell-hs

Partial log (click to expand)

dist/doc/html/hunspell-hs/hunspell-hs.txt
installing
Installing library in /nix/store/kx08674pksd7p7r1wl7ngq5h4vfs5vbc-hunspell-hs-0.1.0.0/lib/ghc-8.4.3/hunspell-hs-0.1.0.0
post-installation fixup
strip is /nix/store/vvbmqsh5ikrxkiwj71dwfbzcwf4bfav8-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/kx08674pksd7p7r1wl7ngq5h4vfs5vbc-hunspell-hs-0.1.0.0/lib
patching script interpreter paths in /nix/store/kx08674pksd7p7r1wl7ngq5h4vfs5vbc-hunspell-hs-0.1.0.0
strip is /nix/store/vvbmqsh5ikrxkiwj71dwfbzcwf4bfav8-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/7gaqmbcw2073hlrs6kcc8im5cirdll51-hunspell-hs-0.1.0.0-doc
/nix/store/kx08674pksd7p7r1wl7ngq5h4vfs5vbc-hunspell-hs-0.1.0.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: haskellPackages.hunspell-hs

Partial log (click to expand)

strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/w925axk95m302hkl857zxgpgiavsw4km-hunspell-hs-0.1.0.0/lib
patching script interpreter paths in /nix/store/w925axk95m302hkl857zxgpgiavsw4km-hunspell-hs-0.1.0.0
checking for references to /build in /nix/store/w925axk95m302hkl857zxgpgiavsw4km-hunspell-hs-0.1.0.0...
wrong ELF type
shrinking RPATHs of ELF executables and libraries in /nix/store/l69y7fjlx74kp4r518khv0x3i09762xq-hunspell-hs-0.1.0.0-doc
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/l69y7fjlx74kp4r518khv0x3i09762xq-hunspell-hs-0.1.0.0-doc
checking for references to /build in /nix/store/l69y7fjlx74kp4r518khv0x3i09762xq-hunspell-hs-0.1.0.0-doc...
/nix/store/w925axk95m302hkl857zxgpgiavsw4km-hunspell-hs-0.1.0.0

@@ -0,0 +1,30 @@
diff -Naur hunspell-hs-0.1.0.0.orig/hunspell-hs.cabal hunspell-hs-0.1.0.0/hunspell-hs.cabal
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be nicer to obtain the patch with fetchpatch from the commit in the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would include the extra-source-files: line mentioning files, which aren't present on hackage. I think Cabal would stumble about that, but I can try it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That doesn't work at all. For nixpkgs I alter a .cabal file, which only exists in the hackage upload. For the PR to hunspell-hs I alter a package.yaml file.

Using pkgconfig like jtojnar suggested.

Disables tests as some necessary data files
aren't included on hackage.
@typetetris
Copy link
Contributor Author

Switched to using pkgconfig as jtojnar suggested, that really works better. Also upstreamed use of pkgconfig in said pr ashutoshrishi/hunspell-hs#3

@basvandijk
Copy link
Member

@GrahamcOfBorg build haskellPackages.hunspell-hs

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: haskellPackages.hunspell-hs

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: haskellPackages.hunspell-hs

Partial log (click to expand)

dist/doc/html/hunspell-hs/hunspell-hs.txt
installing
Installing library in /nix/store/b5vkz9j0lvd860hh8dihs8zdm3x9wcrl-hunspell-hs-0.1.0.0/lib/ghc-8.4.3/hunspell-hs-0.1.0.0
post-installation fixup
strip is /nix/store/vvbmqsh5ikrxkiwj71dwfbzcwf4bfav8-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/b5vkz9j0lvd860hh8dihs8zdm3x9wcrl-hunspell-hs-0.1.0.0/lib
patching script interpreter paths in /nix/store/b5vkz9j0lvd860hh8dihs8zdm3x9wcrl-hunspell-hs-0.1.0.0
strip is /nix/store/vvbmqsh5ikrxkiwj71dwfbzcwf4bfav8-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/bxcibxjydn15pbrxn4c9pqzc4zpfn1br-hunspell-hs-0.1.0.0-doc
/nix/store/b5vkz9j0lvd860hh8dihs8zdm3x9wcrl-hunspell-hs-0.1.0.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: haskellPackages.hunspell-hs

Partial log (click to expand)

strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/8dxaxybp9qrhyxj8ci5nxja4h5qjk0qn-hunspell-hs-0.1.0.0/lib
patching script interpreter paths in /nix/store/8dxaxybp9qrhyxj8ci5nxja4h5qjk0qn-hunspell-hs-0.1.0.0
checking for references to /build in /nix/store/8dxaxybp9qrhyxj8ci5nxja4h5qjk0qn-hunspell-hs-0.1.0.0...
wrong ELF type
shrinking RPATHs of ELF executables and libraries in /nix/store/a69dcdpg0zf7k09nynn00pgs1ag10khf-hunspell-hs-0.1.0.0-doc
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/a69dcdpg0zf7k09nynn00pgs1ag10khf-hunspell-hs-0.1.0.0-doc
checking for references to /build in /nix/store/a69dcdpg0zf7k09nynn00pgs1ag10khf-hunspell-hs-0.1.0.0-doc...
/nix/store/8dxaxybp9qrhyxj8ci5nxja4h5qjk0qn-hunspell-hs-0.1.0.0

@basvandijk basvandijk merged commit 7f3f9ff into NixOS:master Aug 26, 2018
@basvandijk
Copy link
Member

@typetetris thanks!

@typetetris typetetris deleted the hunspell-hs-fix branch August 27, 2018 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants