From 28271c9a6ff45c4dc9ad4e933fa28915b3bf6898 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Thu, 1 Jul 2021 21:51:23 +0300 Subject: [PATCH] CAD-2907 workbench shell: withR argument to include R packages --- .gitignore | 1 + shell.nix | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index fd91c09817..38667b6b5d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ dist/ \.#* *.swp .dir-locals.el +.Rhistory result* /launch-* stack.yaml.lock diff --git a/shell.nix b/shell.nix index f7cc71f98c..b75b02ec4c 100644 --- a/shell.nix +++ b/shell.nix @@ -8,6 +8,7 @@ in , clusterProfile ? defaultCustomConfig.localCluster.profileName , autoStartCluster ? defaultCustomConfig.localCluster.autoStartCluster , workbenchDevMode ? defaultCustomConfig.localCluster.workbenchDevMode +, withR ? false , customConfig ? { inherit withHoogle; localCluster = { @@ -60,6 +61,10 @@ let workbench = pkgs.callPackage ./nix/workbench { inherit useCabalRun; }; }; + rstudio = pkgs.rstudioWrapper.override { + packages = with pkgs.rPackages; [ car dplyr ggplot2 reshape2 ]; + }; + shell = let cluster = mkCluster { useCabalRun = true; }; in cardanoNodeProject.shellFor { @@ -100,6 +105,10 @@ let [ cluster.workbench.workbench ] + ++ lib.optionals withR + [ + rstudio + ] ## Local cluster not available on Darwin, ## because psmisc fails to build on Big Sur. ++ lib.optionals (!stdenv.isDarwin)