Skip to content

Commit

Permalink
CAD-2907 workbench shell: withR argument to include R packages
Browse files Browse the repository at this point in the history
  • Loading branch information
deepfire committed Jul 14, 2021
1 parent 5b4f718 commit 28271c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dist/
\.#*
*.swp
.dir-locals.el
.Rhistory
result*
/launch-*
stack.yaml.lock
Expand Down
9 changes: 9 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ in
, clusterProfile ? defaultCustomConfig.localCluster.profileName
, autoStartCluster ? defaultCustomConfig.localCluster.autoStartCluster
, workbenchDevMode ? defaultCustomConfig.localCluster.workbenchDevMode
, withR ? false
, customConfig ? {
inherit withHoogle;
localCluster = {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 28271c9

Please sign in to comment.