about summary refs log tree commit diff
path: root/shells/README
blob: 388ce777448ec58fefb83bea004c71372d23f596 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
                               ========
                               <shells>
                               ========

This is a collection of Nix expressions for use with nix-shell.

The idea is that if I'm working on a bunch of Rust programs, I don't
want to have to copy or write a shell.nix with all the standard Rust
stuff for every program -- rustc, cargo, rust-analyzer, etc.

So instead of doing that, I have a "shells" directory in my NIX_PATH,
containing a "rust.nix" file.  When I just want to build some program
as a one off, I'll just do this:

    nix-shell rust.nix

And if it's something I'm going to be working on long term, and I want
to use lorri and stuff, I can create a shell.nix that just contains

    import <shells/rust.nix>

I could even extend it with project-specific dependencies like
pkg-config or OpenSSL.

Either way, I can now just modify rust.nix to add things to all my
Rust environments at once, and store these environments with all my
other Nix configuration.  Yay!