Rust+Cargo: https://gitlab.com/kevincox/watchlog/-/blob/22c877065f763b3d...
Node+NPM: https://gitlab.com/kevincox/kevincox-web-compiler/-/blob/9fa...
My only Ruby project is private but I just rolled my own with:
export "GEM_HOME=$out"
bundle install --jobs $NIX_BUILD_CORES
Then I can set the resulting derivation as $GEM_HOME in the build step.And sorry, but I don't do much Python.
For development you then use nix-shell to build the environment with all of the dependencies available. The downside is that you either need to commit the default.nix to the project, or configure it to be ignored. But the advantage is that it handles everything for you. For example you can configure native libraries such as PostgreSQL client or openssl without worrying if they are installed on your system. This means that the entire dev environment is tested in CI (assuming that you run nix-build in CI).
This is also nicer than docker/VM based dev environments as it just prefixes your usual environment with the deps, so you still have your regular commands and development tools available.
In the linked case I use this library to manage that https://github.com/nmattia/napalm (in that example I use master but for production I would pin a version). It simply parses the package-lock.json, downloads the packages and uses npm to build the node_modules folder. It also provides some convenient functions for building packages with "bin" files or just linking node_modules inside a build.
Note that this is more for project development. It doesn't use the "system" packages (intentionally) for Node, it fetches whatever versions you have specified from NPM. Nix will only provide the "native" stuff like Node and NPM themselves and any native libraries.
Services and dev tools want to hog system ports. Can I run multiple dev projects each managing own services in Pycharm?