@@ -29,6 +29,30 @@ profile. The set of available libraries can be discovered by running the
2929command `nix-env -f "<nixpkgs>" -qaP -A rPackages`. The first column from that
3030output is the name that has to be passed to rWrapper in the code snipped above.
3131
32+However, if you'd like to add a file to your project source to make the
33+environment available for other contributors, you can create a `default.nix`
34+file like so:
35+```nix
36+let
37+ pkgs = import <nixpkgs> {};
38+ stdenv = pkgs.stdenv;
39+in with pkgs; {
40+ myProject = stdenv.mkDerivation {
41+ name = "myProject";
42+ version = "1";
43+ src = if pkgs.lib.inNixShell then null else nix;
44+
45+ buildInputs = with rPackages; [
46+ R
47+ ggplot2
48+ knitr
49+ ];
50+ };
51+}
52+```
53+and then run `nix-shell .` to be dropped into a shell with those packages
54+available.
55+
3256## Updating the package set
3357
3458```bash