mirror of
https://github.com/dwinkler1/fran.git
synced 2026-02-19 22:50:59 -05:00
mkR function
This commit is contained in:
parent
92d249ab8b
commit
72e1c080bd
1 changed files with 46 additions and 24 deletions
70
flake.nix
70
flake.nix
|
|
@ -22,6 +22,23 @@
|
|||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
|
||||
mkR = {
|
||||
pkgs,
|
||||
packages,
|
||||
}: let
|
||||
juliaPackages = builtins.concatMap (p: (p.passthru or {}).juliaPackages or []) packages;
|
||||
in
|
||||
pkgs.buildEnv {
|
||||
name = "rWithDependencies";
|
||||
paths =
|
||||
[
|
||||
(pkgs.rWrapper.override {inherit packages;})
|
||||
]
|
||||
++ (pkgs.lib.optionals (builtins.length juliaPackages > 0) [
|
||||
(pkgs.julia-bin.withPackages juliaPackages)
|
||||
]);
|
||||
};
|
||||
|
||||
# The overlay that exposes custom R packages
|
||||
overlay = final: prev: {
|
||||
extraRPackageDeps = {
|
||||
|
|
@ -31,28 +48,31 @@
|
|||
fetchfromGitHubJSONFile = path: prev.fetchFromGitHub (builtins.fromJSON (builtins.readFile path));
|
||||
in {
|
||||
## F
|
||||
fwildclusterboot = prev.rPackages.buildRPackage {
|
||||
name = "fwildclusterboot";
|
||||
src = fetchfromGitHubJSONFile ./versions/fwildclusterboot.json;
|
||||
propagatedBuildInputs = builtins.attrValues {
|
||||
inherit
|
||||
(prev.rPackages)
|
||||
collapse
|
||||
dqrng
|
||||
dreamerr
|
||||
Formula
|
||||
generics
|
||||
gtools
|
||||
JuliaConnectoR
|
||||
Matrix
|
||||
Rcpp
|
||||
rlang
|
||||
summclust
|
||||
RcppArmadillo
|
||||
RcppEigen
|
||||
;
|
||||
};
|
||||
};
|
||||
fwildclusterboot =
|
||||
(prev.rPackages.buildRPackage {
|
||||
name = "fwildclusterboot";
|
||||
src = fetchfromGitHubJSONFile ./versions/fwildclusterboot.json;
|
||||
propagatedBuildInputs = builtins.attrValues {
|
||||
inherit
|
||||
(prev.rPackages)
|
||||
collapse
|
||||
dqrng
|
||||
dreamerr
|
||||
Formula
|
||||
generics
|
||||
gtools
|
||||
JuliaConnectoR
|
||||
Matrix
|
||||
Rcpp
|
||||
rlang
|
||||
summclust
|
||||
RcppArmadillo
|
||||
RcppEigen
|
||||
;
|
||||
};
|
||||
}).overrideAttrs (old: {
|
||||
passthru = (old.passthru or {}) // {juliaPackages = ["WildBootTests" "StableRNGs"];};
|
||||
});
|
||||
|
||||
## H
|
||||
httpgd = prev.rPackages.buildRPackage {
|
||||
|
|
@ -106,7 +126,10 @@
|
|||
overlays = [self.overlays.default];
|
||||
};
|
||||
in {
|
||||
default = pkgs.rWrapper.override {packages = builtins.attrValues pkgs.extraRPackages;};
|
||||
default = mkR {
|
||||
inherit pkgs;
|
||||
packages = builtins.attrValues pkgs.extraRPackages;
|
||||
};
|
||||
franUpdate = pkgs.writeShellScriptBin "fran-update" (import ./versions pkgs);
|
||||
}
|
||||
);
|
||||
|
|
@ -121,7 +144,6 @@
|
|||
default = pkgs.mkShell {
|
||||
packages = with self.packages."${system}"; [
|
||||
default
|
||||
pkgs.extraRPackageDeps.julia-fwildclusterboot
|
||||
franUpdate
|
||||
];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue