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

Add support for SSL in ocamlPackage.conduit. #40552

Merged
merged 1 commit into from May 15, 2018

Conversation

Zimmi48
Copy link
Member

@Zimmi48 Zimmi48 commented May 15, 2018

Motivation for this change

This makes it possible to run the example given at https://github.com/mirage/ocaml-cohttp#client-tutorial

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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.

@Zimmi48
Copy link
Member Author

Zimmi48 commented May 15, 2018

This also make cohttp-curl-lwt work with HTTPS.

@Zimmi48
Copy link
Member Author

Zimmi48 commented May 15, 2018

@vbgl It seems that you are the maintainer of this package.

@vbgl
Copy link
Contributor

vbgl commented May 15, 2018

Does it change anything?

@Zimmi48
Copy link
Member Author

Zimmi48 commented May 15, 2018

Before this change, if you call cohttp-curl-lwt on an HTTPS address, it gives an uncaught exception "No SSL support". After this change, it works.

@vbgl
Copy link
Contributor

vbgl commented May 15, 2018

This change should go to conduit/lwt-unix.nix: it does not impact the conduit library, only the conduit-lwt-unix library.

@Zimmi48
Copy link
Member Author

Zimmi48 commented May 15, 2018

I got confused by the

if !stdenv.lib.versionAtLeast conduit-lwt.version "1.0"
then conduit-lwt
else

stdenv.mkDerivation rec {

preamble. I never manage to read these things. And so I thought that this file was just something older.

@Zimmi48
Copy link
Member Author

Zimmi48 commented May 15, 2018

Changed.

@vbgl
Copy link
Contributor

vbgl commented May 15, 2018

@GrahamcOfBorg build ocamlPackages.cohttp-lwt-unix

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: ocamlPackages.cohttp-lwt-unix

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/rbisr3j9jgnyb1s9vj7izm76pm28r15c-ocaml4.05.0-cohttp-lwt-unix-1.0.2
shrinking /nix/store/rbisr3j9jgnyb1s9vj7izm76pm28r15c-ocaml4.05.0-cohttp-lwt-unix-1.0.2/bin/cohttp-server-lwt
shrinking /nix/store/rbisr3j9jgnyb1s9vj7izm76pm28r15c-ocaml4.05.0-cohttp-lwt-unix-1.0.2/bin/cohttp-curl-lwt
shrinking /nix/store/rbisr3j9jgnyb1s9vj7izm76pm28r15c-ocaml4.05.0-cohttp-lwt-unix-1.0.2/bin/cohttp-proxy-lwt
shrinking /nix/store/rbisr3j9jgnyb1s9vj7izm76pm28r15c-ocaml4.05.0-cohttp-lwt-unix-1.0.2/lib/ocaml/4.05.0/site-lib/cohttp-lwt-unix/cohttp_lwt_unix.cmxs
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/rbisr3j9jgnyb1s9vj7izm76pm28r15c-ocaml4.05.0-cohttp-lwt-unix-1.0.2/lib  /nix/store/rbisr3j9jgnyb1s9vj7izm76pm28r15c-ocaml4.05.0-cohttp-lwt-unix-1.0.2/bin
patching script interpreter paths in /nix/store/rbisr3j9jgnyb1s9vj7izm76pm28r15c-ocaml4.05.0-cohttp-lwt-unix-1.0.2
checking for references to /build in /nix/store/rbisr3j9jgnyb1s9vj7izm76pm28r15c-ocaml4.05.0-cohttp-lwt-unix-1.0.2...
/nix/store/rbisr3j9jgnyb1s9vj7izm76pm28r15c-ocaml4.05.0-cohttp-lwt-unix-1.0.2

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: ocamlPackages.cohttp-lwt-unix

Partial log (click to expand)

patching script interpreter paths in /nix/store/31xwv50p86911zmdcxhrjq3df1di633l-ocaml4.06.1-stringext-1.4.3
checking for references to /build in /nix/store/31xwv50p86911zmdcxhrjq3df1di633l-ocaml4.06.1-stringext-1.4.3...
cannot build derivation '/nix/store/d4yb3d2z3ncqqr0dvbp4amdbm4nmishk-ocaml4.06.1-uri-1.9.6.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/ihxcprkxggglvzms8d31ni1vvaq9qkan-ocaml4.06.1-cohttp-1.0.2.drv': 8 dependencies couldn't be built
cannot build derivation '/nix/store/5csp04bk82zd1llvz2by3dxy4q5ahz53-ocaml4.06.1-conduit-1.0.0.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/jxc2m7d5sbhrbf3q13x93bkdnz0r42km-ocaml4.06.1-cohttp-lwt-1.0.2.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/6d1byrn8n0a2hyacfr2qfnywyx5wqa67-ocaml4.06.1-conduit-lwt-1.0.0.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/grb8r4pmb7cir68qwq2m0xcn2mfmphcx-ocaml4.06.1-conduit-lwt-unix-1.0.0.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/xqgr1nlyh6v1rfv9fpk3q3py3i76v5pi-ocaml4.06.1-cohttp-lwt-unix-1.0.2.drv': 7 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/xqgr1nlyh6v1rfv9fpk3q3py3i76v5pi-ocaml4.06.1-cohttp-lwt-unix-1.0.2.drv' failed

@vbgl
Copy link
Contributor

vbgl commented May 15, 2018

The error on aarch64 is quite funny : opam is incompatible with OCaml 4.06…

@vbgl vbgl merged commit 202f19b into NixOS:master May 15, 2018
@Zimmi48 Zimmi48 deleted the conduit-ssl-support branch May 15, 2018 15:44
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

3 participants