Stream: nix

Topic: How to override Python packages?


view this post on Zulip Rohit Singh (Dec 11 2023 at 18:27):

In a project we are using boto3 package which is imported from python3. Our requirement is to update the boto3 package without updating nixpkgs version, basically we wanted to override only boto3 package. How can we do that ?

This is how we are importing the package boto3 with other packages from python3 using nixpkgs

infra-env = pkgs.python3.withPackages (ps: with ps; [ boto3 kubernetes requests schema python-jenkins croniter validators]);

view this post on Zulip Srid (Dec 11 2023 at 18:29):

Looks like you want overridePythonAttrs, it is documented here:

https://nixos.org/manual/nixpkgs/stable/#overridePythonAttrs

image.png

view this post on Zulip Rohit Singh (Dec 11 2023 at 18:33):

Sure. Let me try that.


Last updated: Nov 13 2024 at 11:14 UTC