it wouldn't be my problem if it weren't NixOS since c libs would be globally available so i could just use virtualenv and not care
stuff i want:
-
mutable virtualenv that i can install in editable mode into because i often work on multiple packages at once
-
some nixpkgs Python packages in my virtualenv because unfortunately native deps exist
-
negotiable, but i want to be able to just pip install stuff in my user profile for quick hacking. or at least have stuff like ipython etc. currently i use python.withPackages for this which breaks pip user install.
mach-nix and the nixpkgs Python infrastructure gets me the latter but not the former afaik
It seems like you can't compose nixpkgs Python packages and virtualenv, which is extremely frustrating: virtualenvs can't use packages from nixpkgs as far as i can tell. The only way seems to be to use mach-nix or nixpkgs to provide the Python environment including dependencies and ignore both pip and virtualenv.
in haskell land (i used to say haskell deps are equally abysmal but i don't believe it anymore, haskell is less bad) it works like so: you use nix to acquire project deps, then while working on them locally you just stick your local hacking copies into cabal.project and they're not nix's problem until you release. https://jade.fyi/blog/nix-hls-for-deps/
or you can just get a standard cabal toolchain from Nix and ignore Nix modulo providing the necessary c libs as inputs to your shell (which will just work because pkg-config). i feel like this is a lot harder with python.