forked from rarias/bscpkgs
WIP: postprocessing pipeline
Now each run is executed in a independent folder
This commit is contained in:
33
garlic/pp/rplot.nix
Normal file
33
garlic/pp/rplot.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
stdenv
|
||||
, rWrapper
|
||||
, rPackages
|
||||
}:
|
||||
|
||||
{
|
||||
# The two results to be compared
|
||||
dataset
|
||||
, script
|
||||
, extraRPackages ? []
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
customR = rWrapper.override {
|
||||
packages = with rPackages; [ tidyverse ] ++ extraRPackages;
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "plot";
|
||||
buildInputs = [ customR ];
|
||||
preferLocalBuild = true;
|
||||
dontPatchShebangs = true;
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cd $out
|
||||
Rscript --vanilla ${script} ${dataset}
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user