dream2nix
dream2nix copied to clipboard
How to make the lock building process for python proxy aware?
Hello,
I'm a nix n00b and am still learning this process... honestly I should probably just use some docker build scripts, but I really like the ability of nix to cache builds, and build for seperate architectures, and I think the build process is more secure/clean thatn dockerfile.
anyway, in order to build a python package I understand you have to run nix run .#default.lock to build the lock.json that the nix build script can use to understand which versions of python packages to use....
So now my issue is that the default script that runs the lock is not proxy aware like the rest of my nixos system is... how can I modify: https://github.com/nix-community/dream2nix/tree/main/examples/packages/languages/python-local-development/flake.nix
so that it can use my system proxy settings? specifically the export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt file setup in this environment variable?
I figure I probably need to add/override the environment in this structure thats instantiated in the flake, but I have no idea how to do that? https://github.com/nix-community/dream2nix/blob/main/modules/dream2nix/core/lock/interface.nix I'm not sure how to reference this lock interface structure...
I figure it will probably look something like this: https://github.com/NixOS/nixpkgs/issues/201189#issuecomment-1317007224
Please let me know anything that you need to make this question make more sense!