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

freeswitch: expose compilation option to enable postgres support #54593

Merged
merged 1 commit into from Feb 1, 2019

Conversation

pmahoney
Copy link
Contributor

Motivation for this change

To run freeswitch with postgresql backend.

Tested with nix-build -E 'with import ./. { }; freeswitch.override { enablePostgres = true; }'

Not sure if enabling postgres should be the default or not. It would simplify my life it it was (closure size 135 to 142 MiB with postgres)

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

@Mic92
Copy link
Member

Mic92 commented Jan 26, 2019

@GrahamcOfBorg build freeswitch

@infinisil
Copy link
Member

I think it's fine to turn it on by default, the closure size increase is negligible.

@pmahoney
Copy link
Contributor Author

Ok, I've made postgres the default.

@GrahamcOfBorg build freeswitch

@infinisil
Copy link
Member

@GrahamcOfBorg build freeswitch

(ofborg only does requests from known people)

, SystemConfiguration
}:

with stdenv.lib;
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that you use with stdenv.lib; twice.

You may add lib as derivation input (next to stdenv), and refer as lib.optionals in all other places. This is probably better alternative than just remove second duplicate.

@pmahoney
Copy link
Contributor Author

pmahoney commented Feb 1, 2019

@danbst Good catch, thank you.

@danbst danbst merged commit 6195a47 into NixOS:master Feb 1, 2019
@danbst
Copy link
Contributor

danbst commented Feb 1, 2019

I hope it works. The problem I've got most likely isn't related to this PR:

$ sudo freeswitch
Cannot open pid file /nix/store/p3bi9mli3cfldsnh3kls1wz2kdvkx439-freeswitch-1.6.20/var/run/freeswitch/freeswitch.pid.

@pmahoney
Copy link
Contributor Author

pmahoney commented Feb 3, 2019

@danbst Yes... there are some annoyances with freeswitch. It works if you supply a configuration with appropriate values for log dirs, pid files, etc.. I'd like to slowly chip away at some of these issues, but only have limited time (and I'm not using freeswitch on NixOS, and have no use for a NixOS service module at this time).

@pmahoney pmahoney deleted the freeswitch-pg branch February 5, 2019 04:14
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

5 participants