Unverified Commit 8811094f authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

Merge pull request #327718 from TomaSajt/jasp-desktop

jasp-desktop: 0.18.3 -> 0.19.0, format with nixfmt
parents ba8988dc b3de6e58
Loading
Loading
Loading
Loading
+526 −54
Original line number Diff line number Diff line
{ R
, rPackages
, fetchFromGitHub
, jasp-src
, jasp-version
{
  rPackages,
  fetchFromGitHub,
  jasp-src,
  jasp-version,
}:

with rPackages;
@@ -21,7 +21,18 @@ let
    src = jasp-src;
    sourceRoot = "${jasp-src.name}/Engine/jaspGraphs";

    propagatedBuildInputs = [ ggplot2 gridExtra gtable lifecycle jsonlite R6 RColorBrewer rlang scales viridisLite ];
    propagatedBuildInputs = [
      ggplot2
      gridExtra
      gtable
      lifecycle
      jsonlite
      R6
      RColorBrewer
      rlang
      scales
      viridisLite
    ];
  };

  jaspBase = buildRPackage {
@@ -41,7 +52,31 @@ let
      cp -r --no-preserve=all ${jaspColumnEncoder-src} inst/include/jaspColumnEncoder
    '';

    propagatedBuildInputs = [ cli codetools ggplot2 gridExtra gridGraphics jaspGraphs jsonlite lifecycle modules officer pkgbuild plyr qgraph ragg R6 Rcpp renv remotes rjson rvg svglite systemfonts withr ];
    propagatedBuildInputs = [
      cli
      codetools
      ggplot2
      gridExtra
      gridGraphics
      jaspGraphs
      jsonlite
      lifecycle
      modules
      officer
      pkgbuild
      plyr
      qgraph
      ragg
      R6
      Rcpp
      renv
      remotes
      rjson
      rvg
      svglite
      systemfonts
      withr
    ];
  };

  stanova = buildRPackage {
@@ -52,7 +87,13 @@ let
      rev = "988ad8e07cda1674b881570a85502be7795fbd4e";
      hash = "sha256-tAeHqTHao2KVRNFBDWmuF++H31aNN6O1ss1Io500QBY=";
    };
    propagatedBuildInputs = [ emmeans lme4 coda rstan MASS ];
    propagatedBuildInputs = [
      emmeans
      lme4
      coda
      rstan
      MASS
    ];
  };

  bstats = buildRPackage {
@@ -63,7 +104,11 @@ let
      rev = "42d34c18df08d233825bae34fdc0dfa0cd70ce8c";
      hash = "sha256-N2KmbTPbyvzsZTWBRE2x7bteccnzokUWDOB4mOWUdJk=";
    };
    propagatedBuildInputs = [ hypergeo purrr SuppDists ];
    propagatedBuildInputs = [
      hypergeo
      purrr
      SuppDists
    ];
  };

  flexplot = buildRPackage {
@@ -71,10 +116,28 @@ let
    src = fetchFromGitHub {
      owner = "dustinfife";
      repo = "flexplot";
      rev = "4223ad5fb56028018b964d6f9f5aa5bac8710821";
      hash = "sha256-L+Ed2bIWjq3ZIAGookp8dAjDSeldEbcwynwFVVZ9IcU=";
      rev = "303a03968f677e71c99a5e22f6352c0811b7b2fb";
      hash = "sha256-iT5CdtNk0Oi8gga76L6YtyWGACAwpN8A/yTBy7JJERc=";
    };
    propagatedBuildInputs = [ cowplot MASS tibble withr dplyr magrittr forcats purrr plyr R6 ggplot2 patchwork ggsci lme4 party mgcv rlang ];
    propagatedBuildInputs = [
      cowplot
      MASS
      tibble
      withr
      dplyr
      magrittr
      forcats
      purrr
      plyr
      R6
      ggplot2
      patchwork
      ggsci
      lme4
      party
      mgcv
      rlang
    ];
  };

  # conting has been removed from CRAN
@@ -86,10 +149,17 @@ let
      rev = "03a4eb9a687e015d602022a01d4e638324c110c8";
      hash = "sha256-Sp09YZz1WGyefn31Zy1qGufoKjtuEEZHO+wJvoLArf0=";
    };
    propagatedBuildInputs = [ mvtnorm gtools tseries coda ];
    propagatedBuildInputs = [
      mvtnorm
      gtools
      tseries
      coda
    ];
  };

  buildJaspModule = name: deps: buildRPackage {
  buildJaspModule =
    name: deps:
    buildRPackage {
      name = "${name}-${jasp-version}";
      version = jasp-version;
      src = jasp-src;
@@ -98,40 +168,442 @@ let
    };
in
{
  engine = { inherit jaspBase jaspGraphs; };
  engine = {
    inherit jaspBase jaspGraphs;
  };

  modules = rec {
    jaspAcceptanceSampling = buildJaspModule "jaspAcceptanceSampling" [ abtest BayesFactor conting' ggplot2 jaspBase jaspGraphs plyr stringr vcd vcdExtra AcceptanceSampling ];
    jaspAnova = buildJaspModule "jaspAnova" [ afex BayesFactor boot car colorspace emmeans ggplot2 jaspBase jaspDescriptives jaspGraphs jaspTTests KernSmooth matrixStats multcomp onewaytests plyr stringi stringr restriktor ];
    jaspAudit = buildJaspModule "jaspAudit" [ bstats extraDistr ggplot2 ggrepel jaspBase jaspGraphs jfa ];
    jaspBain = buildJaspModule "jaspBain" [ bain lavaan ggplot2 semPlot stringr jaspBase jaspGraphs jaspSem ];
    jaspBsts = buildJaspModule "jaspBsts" [ Boom bsts ggplot2 jaspBase jaspGraphs matrixStats reshape2 ];
    jaspCircular = buildJaspModule "jaspCircular" [ jaspBase jaspGraphs circular ggplot2 ];
    jaspCochrane = buildJaspModule "jaspCochrane" [ jaspBase jaspGraphs jaspDescriptives jaspMetaAnalysis ];
    jaspDescriptives = buildJaspModule "jaspDescriptives" [ ggplot2 ggrepel jaspBase jaspGraphs ];
    jaspDistributions = buildJaspModule "jaspDistributions" [ car fitdistrplus ggplot2 goftest gnorm jaspBase jaspGraphs MASS sgt sn ];
    jaspEquivalenceTTests = buildJaspModule "jaspEquivalenceTTests" [ BayesFactor ggplot2 jaspBase jaspGraphs metaBMA TOSTER jaspTTests ];
    jaspFactor = buildJaspModule "jaspFactor" [ ggplot2 jaspBase jaspGraphs jaspSem lavaan psych qgraph reshape2 semPlot GPArotation Rcsdp semTools ];
    jaspFrequencies = buildJaspModule "jaspFrequencies" [ abtest BayesFactor conting' multibridge ggplot2 jaspBase jaspGraphs plyr stringr vcd vcdExtra ];
    jaspJags = buildJaspModule "jaspJags" [ coda ggplot2 ggtext hexbin jaspBase jaspGraphs rjags scales stringr ];
    jaspLearnBayes = buildJaspModule "jaspLearnBayes" [ extraDistr ggplot2 HDInterval jaspBase jaspGraphs MASS MCMCpack MGLM scales ggalluvial ragg runjags ggdist png posterior ];
    jaspLearnStats = buildJaspModule "jaspLearnStats" [ extraDistr ggplot2 jaspBase jaspGraphs jaspDistributions jaspDescriptives jaspTTests ggforce tidyr igraph ];
    jaspMachineLearning = buildJaspModule "jaspMachineLearning" [ kknn AUC cluster colorspace DALEX dbscan e1071 fpc gbm Gmedian ggparty ggdendro ggnetwork ggplot2 ggrepel ggridges glmnet jaspBase jaspGraphs MASS mvnormalTest neuralnet network partykit plyr randomForest rpart ROCR Rtsne signal ];
    jaspMetaAnalysis = buildJaspModule "jaspMetaAnalysis" [ dplyr ggplot2 jaspBase jaspGraphs MASS metaBMA metafor psych purrr rstan stringr tibble tidyr weightr BayesTools RoBMA metamisc ggmcmc pema ];
    jaspMixedModels = buildJaspModule "jaspMixedModels" [ afex emmeans ggplot2 ggpol jaspBase jaspGraphs lme4 loo mgcv rstan rstanarm stanova withr ];
    jaspNetwork = buildJaspModule "jaspNetwork" [ bootnet BDgraph corpcor dplyr foreach ggplot2 gtools HDInterval huge IsingSampler jaspBase jaspGraphs mvtnorm qgraph reshape2 snow stringr ];
    jaspPower = buildJaspModule "jaspPower" [ pwr jaspBase jaspGraphs ];
    jaspPredictiveAnalytics = buildJaspModule "jaspPredictiveAnalytics" [ jaspBase jaspGraphs bsts bssm precrec reshape2 Boom lubridate prophet BART EBMAforecast imputeTS ];
    jaspProcess = buildJaspModule "jaspProcess" [ dagitty ggplot2 ggraph jaspBase jaspGraphs ];
    jaspProphet = buildJaspModule "jaspProphet" [ rstan ggplot2 jaspBase jaspGraphs prophet scales ];
    jaspQualityControl = buildJaspModule "jaspQualityControl" [ car cowplot daewr desirability DoE_base EnvStats FAdist fitdistrplus FrF2 ggplot2 ggrepel goftest ggpp irr jaspBase jaspDescriptives jaspGraphs mle_tools psych qcc rsm Rspc tidyr tibble vipor weibullness ];
    jaspRegression = buildJaspModule "jaspRegression" [ BAS boot bstats combinat emmeans ggplot2 ggrepel hmeasure jaspAnova jaspBase jaspDescriptives jaspGraphs jaspTTests lmtest logistf MASS matrixStats mdscore ppcor purrr Rcpp statmod VGAM ];
    jaspReliability = buildJaspModule "jaspReliability" [ Bayesrel coda ggplot2 ggridges irr jaspBase jaspGraphs LaplacesDemon lme4 MASS psych ];
    jaspRobustTTests = buildJaspModule "jaspRobustTTests" [ RoBTT ggplot2 jaspBase jaspGraphs ];
    jaspSem = buildJaspModule "jaspSem" [ forcats ggplot2 jaspBase jaspGraphs lavaan cSEM reshape2 semPlot semTools stringr tibble tidyr ];
    jaspSummaryStatistics = buildJaspModule "jaspSummaryStatistics" [ BayesFactor bstats jaspBase jaspFrequencies jaspGraphs jaspRegression jaspTTests jaspAnova jaspDescriptives SuppDists bayesplay ];
    jaspSurvival = buildJaspModule "jaspSurvival" [ survival survminer jaspBase jaspGraphs ];
    jaspTTests = buildJaspModule "jaspTTests" [ BayesFactor car ggplot2 jaspBase jaspGraphs logspline plotrix plyr ];
    jaspTimeSeries = buildJaspModule "jaspTimeSeries" [ jaspBase jaspGraphs forecast ];
    jaspVisualModeling = buildJaspModule "jaspVisualModeling" [ flexplot jaspBase jaspGraphs ];
    jaspAcceptanceSampling = buildJaspModule "jaspAcceptanceSampling" [
      abtest
      BayesFactor
      conting'
      ggplot2
      jaspBase
      jaspGraphs
      plyr
      stringr
      vcd
      vcdExtra
      AcceptanceSampling
    ];
    jaspAnova = buildJaspModule "jaspAnova" [
      afex
      BayesFactor
      boot
      car
      colorspace
      emmeans
      effectsize
      ggplot2
      jaspBase
      jaspDescriptives
      jaspGraphs
      jaspTTests
      KernSmooth
      matrixStats
      multcomp
      multcompView
      mvShapiroTest
      onewaytests
      plyr
      stringi
      stringr
      restriktor
    ];
    jaspAudit = buildJaspModule "jaspAudit" [
      bstats
      extraDistr
      ggplot2
      ggrepel
      jaspBase
      jaspGraphs
      jfa
    ];
    jaspBain = buildJaspModule "jaspBain" [
      bain
      lavaan
      ggplot2
      semPlot
      stringr
      jaspBase
      jaspGraphs
      jaspSem
    ];
    jaspBsts = buildJaspModule "jaspBsts" [
      Boom
      bsts
      ggplot2
      jaspBase
      jaspGraphs
      matrixStats
      reshape2
    ];
    jaspCircular = buildJaspModule "jaspCircular" [
      jaspBase
      jaspGraphs
      circular
      ggplot2
    ];
    jaspCochrane = buildJaspModule "jaspCochrane" [
      jaspBase
      jaspGraphs
      jaspDescriptives
      jaspMetaAnalysis
    ];
    jaspDescriptives = buildJaspModule "jaspDescriptives" [
      ggplot2
      ggrepel
      jaspBase
      jaspGraphs
      jaspTTests
      forecast
      flexplot
      ggrain
      ggpp
      ggtext
      dplyr
    ];
    jaspDistributions = buildJaspModule "jaspDistributions" [
      car
      fitdistrplus
      ggplot2
      goftest
      gnorm
      jaspBase
      jaspGraphs
      MASS
      sgt
      sn
    ];
    jaspEquivalenceTTests = buildJaspModule "jaspEquivalenceTTests" [
      BayesFactor
      ggplot2
      jaspBase
      jaspGraphs
      metaBMA
      TOSTER
      jaspTTests
    ];
    jaspFactor = buildJaspModule "jaspFactor" [
      ggplot2
      jaspBase
      jaspGraphs
      jaspSem
      lavaan
      psych
      qgraph
      reshape2
      semPlot
      GPArotation
      Rcsdp
      semTools
    ];
    jaspFrequencies = buildJaspModule "jaspFrequencies" [
      abtest
      BayesFactor
      bridgesampling
      conting'
      multibridge
      ggplot2
      jaspBase
      jaspGraphs
      plyr
      stringr
      vcd
      vcdExtra
    ];
    jaspJags = buildJaspModule "jaspJags" [
      coda
      ggplot2
      ggtext
      hexbin
      jaspBase
      jaspGraphs
      rjags
      runjags
      scales
      stringr
    ];
    jaspLearnBayes = buildJaspModule "jaspLearnBayes" [
      extraDistr
      ggplot2
      HDInterval
      jaspBase
      jaspGraphs
      MASS
      MCMCpack
      MGLM
      scales
      ggalluvial
      ragg
      rjags
      runjags
      ggdist
      png
      posterior
    ];
    jaspLearnStats = buildJaspModule "jaspLearnStats" [
      extraDistr
      ggplot2
      jaspBase
      jaspGraphs
      jaspDistributions
      jaspDescriptives
      jaspTTests
      ggforce
      tidyr
      igraph
    ];
    jaspMachineLearning = buildJaspModule "jaspMachineLearning" [
      kknn
      AUC
      cluster
      colorspace
      DALEX
      dbscan
      e1071
      fpc
      gbm
      Gmedian
      ggparty
      ggdendro
      ggnetwork
      ggplot2
      ggrepel
      ggridges
      glmnet
      jaspBase
      jaspGraphs
      MASS
      mvnormalTest
      neuralnet
      network
      partykit
      plyr
      randomForest
      rpart
      ROCR
      Rtsne
      signal
    ];
    jaspMetaAnalysis = buildJaspModule "jaspMetaAnalysis" [
      dplyr
      ggplot2
      jaspBase
      jaspGraphs
      MASS
      metaBMA
      metafor
      psych
      purrr
      rstan
      stringr
      tibble
      tidyr
      weightr
      BayesTools
      RoBMA
      metamisc
      ggmcmc
      pema
    ];
    jaspMixedModels = buildJaspModule "jaspMixedModels" [
      afex
      emmeans
      ggplot2
      ggpol
      jaspBase
      jaspGraphs
      lme4
      loo
      mgcv
      rstan
      rstanarm
      stanova
      withr
    ];
    jaspNetwork = buildJaspModule "jaspNetwork" [
      bootnet
      BDgraph
      corpcor
      dplyr
      foreach
      ggplot2
      gtools
      HDInterval
      huge
      IsingSampler
      jaspBase
      jaspGraphs
      mvtnorm
      qgraph
      reshape2
      snow
      stringr
    ];
    jaspPower = buildJaspModule "jaspPower" [
      pwr
      jaspBase
      jaspGraphs
    ];
    jaspPredictiveAnalytics = buildJaspModule "jaspPredictiveAnalytics" [
      jaspBase
      jaspGraphs
      bsts
      bssm
      precrec
      reshape2
      Boom
      lubridate
      prophet
      BART
      EBMAforecast
      imputeTS
    ];
    jaspProcess = buildJaspModule "jaspProcess" [
      blavaan
      dagitty
      ggplot2
      ggraph
      jaspBase
      jaspGraphs
      jaspJags
      runjags
    ];
    jaspProphet = buildJaspModule "jaspProphet" [
      rstan
      ggplot2
      jaspBase
      jaspGraphs
      prophet
      scales
    ];
    jaspQualityControl = buildJaspModule "jaspQualityControl" [
      car
      cowplot
      daewr
      desirability
      DoE_base
      EnvStats
      FAdist
      fitdistrplus
      FrF2
      ggplot2
      ggrepel
      goftest
      ggpp
      irr
      jaspBase
      jaspDescriptives
      jaspGraphs
      mle_tools
      psych
      qcc
      rsm
      Rspc
      tidyr
      tibble
      vipor
      weibullness
    ];
    jaspRegression = buildJaspModule "jaspRegression" [
      BAS
      boot
      bstats
      combinat
      emmeans
      ggplot2
      ggrepel
      hmeasure
      jaspAnova
      jaspBase
      jaspDescriptives
      jaspGraphs
      jaspTTests
      lmtest
      logistf
      MASS
      matrixStats
      mdscore
      ppcor
      purrr
      Rcpp
      statmod
      VGAM
    ];
    jaspReliability = buildJaspModule "jaspReliability" [
      Bayesrel
      coda
      ggplot2
      ggridges
      irr
      jaspBase
      jaspGraphs
      LaplacesDemon
      lme4
      MASS
      psych
    ];
    jaspRobustTTests = buildJaspModule "jaspRobustTTests" [
      RoBTT
      ggplot2
      jaspBase
      jaspGraphs
    ];
    jaspSem = buildJaspModule "jaspSem" [
      forcats
      ggplot2
      jaspBase
      jaspGraphs
      lavaan
      cSEM
      reshape2
      semPlot
      semTools
      stringr
      tibble
      tidyr
    ];
    jaspSummaryStatistics = buildJaspModule "jaspSummaryStatistics" [
      BayesFactor
      bstats
      jaspBase
      jaspFrequencies
      jaspGraphs
      jaspRegression
      jaspTTests
      jaspAnova
      jaspDescriptives
      SuppDists
      bayesplay
    ];
    jaspSurvival = buildJaspModule "jaspSurvival" [
      survival
      survminer
      jaspBase
      jaspGraphs
    ];
    jaspTTests = buildJaspModule "jaspTTests" [
      BayesFactor
      car
      ggplot2
      jaspBase
      jaspGraphs
      logspline
      plotrix
      plyr
    ];
    jaspTimeSeries = buildJaspModule "jaspTimeSeries" [
      jaspBase
      jaspGraphs
      jaspDescriptives
      forecast
    ];
    jaspVisualModeling = buildJaspModule "jaspVisualModeling" [
      flexplot
      jaspBase
      jaspGraphs
      jaspDescriptives
    ];
  };
}
+36 −34
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, callPackage
, buildEnv
, linkFarm
, substituteAll
, R
, rPackages
, cmake
, ninja
, pkg-config
, boost
, libarchive
, readstat
, qt6
{
  lib,
  stdenv,
  fetchFromGitHub,
  buildEnv,
  linkFarm,
  substituteAll,
  R,
  rPackages,
  cmake,
  ninja,
  pkg-config,
  boost,
  libarchive,
  readstat,
  qt6,
}:

let
  version = "0.18.3";
  version = "0.19.0";

  src = fetchFromGitHub {
    owner = "jasp-stats";
    repo = "jasp-desktop";
    rev = "v${version}";
    hash = "sha256-eKBxCIamNhUig+0vUEqXYbPjiaOsZk6QnOw8cnpjKFY=";
    hash = "sha256-G84bmR+40W9RV+OIXYuMmwdEFE0iPMp/wEOcRHYUoj8=";
    fetchSubmodules = true;
  };

  inherit (callPackage ./modules.nix {
  moduleSet = import ./modules.nix {
    inherit fetchFromGitHub rPackages;
    jasp-src = src;
    jasp-version = version;
  }) engine modules;
  };

  inherit (moduleSet) engine modules;

  # Merges ${R}/lib/R with all used R packages (even propagated ones)
  customREnv = buildEnv {
@@ -42,8 +45,12 @@ let
    ] ++ lib.attrValues modules;
  };

  modulesDir = linkFarm "jasp-${version}-modules"
    (lib.mapAttrsToList (name: drv: { name = name; path = "${drv}/library"; }) modules);
  modulesDir = linkFarm "jasp-${version}-modules" (
    lib.mapAttrsToList (name: drv: {
      name = name;
      path = "${drv}/library";
    }) modules
  );
in
stdenv.mkDerivation {
  pname = "jasp-desktop";
@@ -66,9 +73,6 @@ stdenv.mkDerivation {
    "-DCUSTOM_R_PATH=${customREnv}"
  ];

  # necessary for R 4.4.0
  hardeningDisable = [ "format" ];

  nativeBuildInputs = [
    cmake
    ninja
@@ -81,13 +85,12 @@ stdenv.mkDerivation {
    boost
    libarchive
    readstat
  ] ++ (with qt6; [
    qtbase
    qtdeclarative
    qtwebengine
    qtsvg
    qt5compat
  ]);
    qt6.qtbase
    qt6.qtdeclarative
    qt6.qtwebengine
    qt6.qtsvg
    qt6.qt5compat
  ];

  env.NIX_LDFLAGS = "-L${rPackages.RInside}/library/RInside/lib";

@@ -98,7 +101,7 @@ stdenv.mkDerivation {
    # Remove flatpak proxy script
    rm $out/bin/org.jaspstats.JASP
    substituteInPlace $out/share/applications/org.jaspstats.JASP.desktop \
        --replace "Exec=org.jaspstats.JASP" "Exec=JASP"
        --replace-fail "Exec=org.jaspstats.JASP" "Exec=JASP"

    # symlink modules from the store
    ln -s ${modulesDir} $out/Modules
@@ -121,4 +124,3 @@ stdenv.mkDerivation {
    platforms = lib.platforms.linux;
  };
}