SmartOS fixes, HAProxy 1.5.3, tinc 1.1-git, and some package updates

This is the cleaned-up version of: https://github.com/NixOS/nixpkgs/pull/2117
An update about this. /bin/sh must be used because of sh compatibility. For it being bash, you should build with nix chroots that bind mounts /bin/sh to bash. This is done automatically on nixos.
So this chunk of code is incorrect in my opinion.