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

libevent: Make OpenSSL dependency optional #29522

Merged

Conversation

aneeshusa
Copy link
Contributor

Motivation for this change
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
    • Linux
  • 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.

@Mic92
Copy link
Member

Mic92 commented Sep 18, 2017

Please also change this pull request to staging.

@fpletz
Copy link
Member

fpletz commented Sep 18, 2017

@Mic92 But this change shouldn't change the hash of libevent?


buildInputs = [ openssl ] ++ stdenv.lib.optional stdenv.isCygwin findutils;
buildInputs = []
++ stdenv.lib.optional enableOpenssl "openssl"
Copy link
Member

Choose a reason for hiding this comment

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

openssl shouldn't be a string here but the reference to the package. 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, you can tell I never actually tried this with openssl enabled...thanks for catching that.

@@ -1,4 +1,9 @@
{ stdenv, fetchurl, openssl, findutils }:
{
stdenv, fetchurl, findutils,
Copy link
Member

@rycee rycee Sep 18, 2017

Choose a reason for hiding this comment

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

This formatting is a bit unusual. Typically the comma is at the beginning of the line. Something like

{ stdenv, fetchurl, findutils
, enableOpenssl ? true, openssl
}:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've seen the comma go both at the beginning and the end and I also find it a bit unbalanced to have a bunch of items on the first line with the open bracket but none on the last line with the close bracket. That being said, it's a minor quibble so I've changed to your recommendation here.

{ stdenv, fetchurl, openssl, findutils }:
{
stdenv, fetchurl, findutils,
enableOpenssl? true, openssl
Copy link
Member

Choose a reason for hiding this comment

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

It seems that sslSupport is more commonly used in Nixpkgs. So I would suggest to use sslSupport ? true here.

@aneeshusa aneeshusa force-pushed the libevent-make-openssl-dependency-optional branch from fb8be58 to 42a8ac1 Compare September 18, 2017 16:22
@Mic92 Mic92 merged commit 11efdaf into NixOS:master Sep 19, 2017
@aneeshusa aneeshusa deleted the libevent-make-openssl-dependency-optional branch January 7, 2022 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants