Sorry, since I know this is a duplicate question, but every source I’ve been able to find has failed me (and a lot of them conflict). I am trying to override python311Packages.django to 4.1.7 (since 4.2+ breaks Seafile), based on a local copy of that version’s derivation. I have tried the below options, and some variations thereon (both python3 and python311 for instance). However, no matter what I try, the latest version of Django is still used.
Thank you for your quick response, but unfortunately it does not work. Using your override, no units are rebuilt and Seafile continues to use Django 4.2.6. Seafile does use python3 (specifically 3.11). The package using Django is seahub.
Your suggestion does indeed work, the old version caused an evaluation error. However, I discovered my more important problem: overriding the package doesn’t seem to change its usage as a dependency. I tried adding environment.systemPackages = [ pkgs.python311Packages.django ] to my config, and suddenly 4.1.7 built immediately. But, Seafile still uses 4.2.6.