A local flake can be created like this:
nix flake init --template github:nomisreual/nomisshells#<name>Note: <name> refers to the name of the template.
Overriding python packages can be achieved like this:
Instead of
python = pkgs.python311;you can do something like:
python = pkgs.python311.override {
packageOverrides = final: prev: {
# Make django point to the django_5 package
django = prev.django_5;
# Disable tests for building django-extensions
django-extensions = prev.django-extensions.overridePythonAttrs (old: rec {
doCheck = false;
});
};
};However, overriding packages can break other packages. Here, checks for django-extensions is disabled, as pointing django to django_5 makes them fail.
There is also a new shell with support for uv, named python_uv. It sets appropriate environmental variables to make sure uv picks up the provided python interpreter.