Skip to content

Created a Nix flake file with a minimal dev shell

Sam Kagan requested to merge nix-developer-shell into main

To use:

  1. Install Nix (follow instructions here: https://nixos.org/download.html)
  2. Allow nix flakes by adding the following line to /etc/nix/nix.conf:
    1. experimental-features = flakes nix-command
  3. Run nix develop in this repo's root

To test that you're now in the developer shell specified in flake.nix, try which python, which node, or which plantuml. All should show paths in /nix/store.

As an example, when I run these I see:

  • /nix/store/m0pc7i5azqlnbsny4pvx8h2178lwnp8x-python3-3.9.16/bin/python
  • /nix/store/mg35mp6zny0qi5433kzzyq8j39snicx7-nodejs-14.21.3/bin/node
  • /nix/store/yif1bwn49j76yavz7lxhplsvcz7p3l7p-plantuml-1.2023.5/bin/plantuml

Note that the hashes (i.e. m0pc7i5azqlnbsny4pvx8h2178lwnp8x) will differ for those on different OSs and CPU architectures, but the versions (i.e. python3-3.9.16) shouldn't.

Edited by Sam Kagan

Merge request reports