I assume not every program provided by Nix needs to access the SQL server, so you should not override openssl in nixpkgs. Assign the modified derivation to openssl_with_tls1 and use it in the inputs of those derivations that actually need to access SQL server.
4 Likes