I'm trying to link my project with static openssl. I've noticed that there is flag static in openssl package: https://github.com/NixOS/nixpkgs/blob/d6a12e8d9e0a4ac35ed401881e0d3160c764ac36/pkgs/development/libraries/openssl/default.nix#L5 but i have no idea how it can be set when using it. (pkgs.openssl ...?).
Currently I "solved" it by using pkgs.pkgsStatic.openssl, but it have very annoying side effect on form of gcc and other not related dependencies being recompiled statically (what the hell?).
How can use openssl package with static flag enabled?