summaryrefslogtreecommitdiffstats
path: root/doc/languages-frameworks/r.section.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/languages-frameworks/r.section.md')
-rw-r--r--doc/languages-frameworks/r.section.md8
1 files changed, 3 insertions, 5 deletions
diff --git a/doc/languages-frameworks/r.section.md b/doc/languages-frameworks/r.section.md
index 32a39ade2796..c420d112c91e 100644
--- a/doc/languages-frameworks/r.section.md
+++ b/doc/languages-frameworks/r.section.md
@@ -32,14 +32,12 @@ However, if you'd like to add a file to your project source to make the
environment available for other contributors, you can create a `default.nix`
file like so:
```nix
-let
- pkgs = import <nixpkgs> {};
- stdenv = pkgs.stdenv;
-in with pkgs; {
+with import <nixpkgs> {};
+{
myProject = stdenv.mkDerivation {
name = "myProject";
version = "1";
- src = if pkgs.lib.inNixShell then null else nix;
+ src = if lib.inNixShell then null else nix;
buildInputs = with rPackages; [
R