mirror of
https://github.com/dwinkler1/fran.git
synced 2026-02-19 14:40:58 -05:00
Refactor packages into modular structure under packages/ directory
Co-authored-by: dwinkler1 <22460147+dwinkler1@users.noreply.github.com>
This commit is contained in:
parent
f812c40980
commit
c365b44ff2
7 changed files with 116 additions and 75 deletions
76
flake.nix
76
flake.nix
|
|
@ -40,81 +40,7 @@
|
|||
extraRPackageDeps = {
|
||||
julia-fwildclusterboot = prev.julia-bin.withPackages ["WildBootTests" "StableRNGs"];
|
||||
};
|
||||
extraRPackages = let
|
||||
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
|
||||
RcppArmadillo
|
||||
RcppEigen
|
||||
;
|
||||
inherit (final.extraRPackages) summclust;
|
||||
};
|
||||
}).overrideAttrs (old: {
|
||||
passthru = (old.passthru or {}) // {juliaPackages = ["WildBootTests" "StableRNGs"];};
|
||||
});
|
||||
|
||||
## H
|
||||
httpgd = prev.rPackages.buildRPackage {
|
||||
name = "httpgd";
|
||||
src = fetchfromGitHubJSONFile ./versions/httpgd.json;
|
||||
propagatedBuildInputs = builtins.attrValues {
|
||||
inherit
|
||||
(prev.rPackages)
|
||||
unigd
|
||||
cpp11
|
||||
AsioHeaders
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
## M
|
||||
musicMetadata = prev.rPackages.buildRPackage {
|
||||
name = "musicMetadata";
|
||||
src = fetchfromGitHubJSONFile ./versions/musicMetadata.json;
|
||||
};
|
||||
|
||||
## S
|
||||
summclust = prev.rPackages.buildRPackage {
|
||||
name = "summclust";
|
||||
|
||||
src = fetchfromGitHubJSONFile ./versions/summclust.json;
|
||||
|
||||
propagatedBuildInputs = builtins.attrValues {
|
||||
inherit
|
||||
(prev.rPackages)
|
||||
dreamerr
|
||||
MASS
|
||||
collapse
|
||||
generics
|
||||
cli
|
||||
rlang
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
synthdid = prev.rPackages.buildRPackage {
|
||||
name = "synthdid";
|
||||
src = fetchfromGitHubJSONFile ./versions/synthdid.json;
|
||||
propagatedBuildInputs = [prev.rPackages.mvtnorm];
|
||||
};
|
||||
};
|
||||
extraRPackages = import ./packages {inherit final prev;};
|
||||
};
|
||||
in {
|
||||
# Helper to install R with system dependencies if required
|
||||
|
|
|
|||
29
packages/default.nix
Normal file
29
packages/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
final,
|
||||
prev,
|
||||
}:
|
||||
let
|
||||
# Shared helper function to fetch from GitHub using JSON version files
|
||||
fetchfromGitHubJSONFile = path: prev.fetchFromGitHub (builtins.fromJSON (builtins.readFile path));
|
||||
|
||||
# Reference to the versions directory at the repo root
|
||||
versionsDir = ../versions;
|
||||
|
||||
# Common arguments passed to all package modules
|
||||
commonArgs = {
|
||||
inherit final prev fetchfromGitHubJSONFile versionsDir;
|
||||
};
|
||||
in {
|
||||
## F
|
||||
fwildclusterboot = import ./f/fwildclusterboot.nix commonArgs;
|
||||
|
||||
## H
|
||||
httpgd = import ./h/httpgd.nix commonArgs;
|
||||
|
||||
## M
|
||||
musicMetadata = import ./m/musicMetadata.nix commonArgs;
|
||||
|
||||
## S
|
||||
summclust = import ./s/summclust.nix commonArgs;
|
||||
synthdid = import ./s/synthdid.nix commonArgs;
|
||||
}
|
||||
30
packages/f/fwildclusterboot.nix
Normal file
30
packages/f/fwildclusterboot.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
final,
|
||||
prev,
|
||||
fetchfromGitHubJSONFile,
|
||||
versionsDir,
|
||||
}:
|
||||
(prev.rPackages.buildRPackage {
|
||||
name = "fwildclusterboot";
|
||||
src = fetchfromGitHubJSONFile "${versionsDir}/fwildclusterboot.json";
|
||||
propagatedBuildInputs = builtins.attrValues {
|
||||
inherit
|
||||
(prev.rPackages)
|
||||
collapse
|
||||
dqrng
|
||||
dreamerr
|
||||
Formula
|
||||
generics
|
||||
gtools
|
||||
JuliaConnectoR
|
||||
Matrix
|
||||
Rcpp
|
||||
rlang
|
||||
RcppArmadillo
|
||||
RcppEigen
|
||||
;
|
||||
inherit (final.extraRPackages) summclust;
|
||||
};
|
||||
}).overrideAttrs (old: {
|
||||
passthru = (old.passthru or {}) // {juliaPackages = ["WildBootTests" "StableRNGs"];};
|
||||
})
|
||||
17
packages/h/httpgd.nix
Normal file
17
packages/h/httpgd.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
prev,
|
||||
fetchfromGitHubJSONFile,
|
||||
versionsDir,
|
||||
}:
|
||||
prev.rPackages.buildRPackage {
|
||||
name = "httpgd";
|
||||
src = fetchfromGitHubJSONFile "${versionsDir}/httpgd.json";
|
||||
propagatedBuildInputs = builtins.attrValues {
|
||||
inherit
|
||||
(prev.rPackages)
|
||||
unigd
|
||||
cpp11
|
||||
AsioHeaders
|
||||
;
|
||||
};
|
||||
}
|
||||
9
packages/m/musicMetadata.nix
Normal file
9
packages/m/musicMetadata.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
prev,
|
||||
fetchfromGitHubJSONFile,
|
||||
versionsDir,
|
||||
}:
|
||||
prev.rPackages.buildRPackage {
|
||||
name = "musicMetadata";
|
||||
src = fetchfromGitHubJSONFile "${versionsDir}/musicMetadata.json";
|
||||
}
|
||||
20
packages/s/summclust.nix
Normal file
20
packages/s/summclust.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
prev,
|
||||
fetchfromGitHubJSONFile,
|
||||
versionsDir,
|
||||
}:
|
||||
prev.rPackages.buildRPackage {
|
||||
name = "summclust";
|
||||
src = fetchfromGitHubJSONFile "${versionsDir}/summclust.json";
|
||||
propagatedBuildInputs = builtins.attrValues {
|
||||
inherit
|
||||
(prev.rPackages)
|
||||
dreamerr
|
||||
MASS
|
||||
collapse
|
||||
generics
|
||||
cli
|
||||
rlang
|
||||
;
|
||||
};
|
||||
}
|
||||
10
packages/s/synthdid.nix
Normal file
10
packages/s/synthdid.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
prev,
|
||||
fetchfromGitHubJSONFile,
|
||||
versionsDir,
|
||||
}:
|
||||
prev.rPackages.buildRPackage {
|
||||
name = "synthdid";
|
||||
src = fetchfromGitHubJSONFile "${versionsDir}/synthdid.json";
|
||||
propagatedBuildInputs = [prev.rPackages.mvtnorm];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue