mirror of
https://github.com/dwinkler1/fran.git
synced 2026-05-22 22:23:32 -04:00
Compare commits
No commits in common. "main" and "copilot/refactor-package-modules-structure" have entirely different histories.
main
...
copilot/re
10 changed files with 51 additions and 94 deletions
2
.github/workflows/check.yml
vendored
2
.github/workflows/check.yml
vendored
|
|
@ -23,7 +23,7 @@ jobs:
|
|||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: cachix/cachix-action@v17
|
||||
- uses: cachix/cachix-action@v16
|
||||
with:
|
||||
name: rde
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
|
|
|
|||
16
flake.lock
generated
16
flake.lock
generated
|
|
@ -2,17 +2,17 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1771303851,
|
||||
"narHash": "sha256-tgveHozOJ2D/mi3LxVy/FcmLFDlM5XKZxsNB2XpvzaM=",
|
||||
"owner": "dwinkler1",
|
||||
"repo": "rixpkgs",
|
||||
"rev": "af2dd3f7b4b172077747c0869d4e30702fb71b0e",
|
||||
"lastModified": 1762778295,
|
||||
"narHash": "sha256-5Ogu11rMpc3ytcfBLwO3O1l1MJl0pTT+uCz/OJixmVo=",
|
||||
"owner": "rstats-on-nix",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b37b5950aa970ed7abe27144f2ca62e6029215e5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "dwinkler1",
|
||||
"ref": "nixpkgs",
|
||||
"repo": "rixpkgs",
|
||||
"owner": "rstats-on-nix",
|
||||
"ref": "2025-11-10",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
31
flake.nix
31
flake.nix
|
|
@ -2,7 +2,7 @@
|
|||
description = "FRAN - The Flakey R Archiving Network";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:dwinkler1/rixpkgs/nixpkgs";
|
||||
nixpkgs.url = "github:rstats-on-nix/nixpkgs/2025-11-10";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
|
@ -37,10 +37,10 @@
|
|||
|
||||
# The overlay that exposes custom R packages
|
||||
overlay = final: prev: {
|
||||
franPackageDeps = {
|
||||
extraRPackageDeps = {
|
||||
julia-fwildclusterboot = prev.julia-bin.withPackages ["WildBootTests" "StableRNGs"];
|
||||
};
|
||||
franPackages = import ./packages {inherit final prev;};
|
||||
extraRPackages = import ./packages {inherit final prev;};
|
||||
};
|
||||
in {
|
||||
# Helper to install R with system dependencies if required
|
||||
|
|
@ -78,34 +78,9 @@
|
|||
franUpdate
|
||||
];
|
||||
};
|
||||
newpkg = pkgs.mkShell {
|
||||
nativeBuildInputs = [
|
||||
pkgs.nix-prefetch-github
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
checks = forAllSystems (
|
||||
system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [self.overlays.default];
|
||||
};
|
||||
rEnv = mkR {
|
||||
inherit pkgs;
|
||||
packages = builtins.attrValues pkgs.extraRPackages;
|
||||
};
|
||||
in {
|
||||
test-script = pkgs.runCommand "test-script" {} ''
|
||||
mkdir -p $out
|
||||
cp ${./test/test.R} test.R
|
||||
${rEnv}/bin/Rscript test.R > $out/result.log
|
||||
'';
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
extra-substituters = [
|
||||
"https://rstats-on-nix.cachix.org"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
final,
|
||||
prev,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
# Shared helper function to fetch from GitHub using JSON version files
|
||||
fetchfromGitHubJSONFile = path: prev.fetchFromGitHub (builtins.fromJSON (builtins.readFile path));
|
||||
|
||||
|
|
@ -14,17 +15,15 @@
|
|||
};
|
||||
|
||||
# Arguments for packages that need access to 'final' (for cross-package dependencies)
|
||||
argsWithFinal =
|
||||
baseArgs
|
||||
// {
|
||||
argsWithFinal = baseArgs // {
|
||||
inherit final;
|
||||
};
|
||||
in {
|
||||
## F
|
||||
fwildclusterboot = import ./f/fwildclusterboot.nix argsWithFinal;
|
||||
|
||||
## J
|
||||
jgd = import ./j/jgd.nix (baseArgs // {lib = prev.lib;});
|
||||
## H
|
||||
httpgd = import ./h/httpgd.nix baseArgs;
|
||||
|
||||
## M
|
||||
musicMetadata = import ./m/musicMetadata.nix baseArgs;
|
||||
|
|
|
|||
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
|
||||
;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
prev,
|
||||
fetchfromGitHubJSONFile,
|
||||
versionsDir,
|
||||
}: let
|
||||
repoSrc = fetchfromGitHubJSONFile "${versionsDir}/jgd.json";
|
||||
|
||||
rPkgSrc = lib.cleanSourceWith {
|
||||
src = repoSrc;
|
||||
filter = path: type: let
|
||||
p = toString path;
|
||||
in
|
||||
# keep r-pkg/ and everything under it
|
||||
(lib.hasPrefix (toString repoSrc + "/r-pkg") p);
|
||||
};
|
||||
in
|
||||
prev.rPackages.buildRPackage {
|
||||
name = "jgd";
|
||||
src = rPkgSrc;
|
||||
sourceRoot = "source/r-pkg";
|
||||
nativeBuildInputs = [
|
||||
prev.pkg-config
|
||||
];
|
||||
}
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
cat("Testing\n")
|
||||
cat("\n============================================================ jgd =========================================================================\n")
|
||||
library(jgd)
|
||||
jgd()
|
||||
|
||||
cat("\n============================================================ fwildclusterboot ============================================================\n")
|
||||
library(fwildclusterboot)
|
||||
data(voters)
|
||||
|
|
@ -34,6 +30,10 @@ summary(boot_lm)
|
|||
summary(boot_lmjl)
|
||||
summary(boot_lmjl2)
|
||||
|
||||
cat("\n============================================================ httpgd ============================================================\n")
|
||||
library(httpgd)
|
||||
hgd()
|
||||
|
||||
cat("\n============================================================ musicMetadata ============================================================\n")
|
||||
library(musicMetadata)
|
||||
print(classify_labels('Interscope'))
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
pkgs: ''
|
||||
pg=${pkgs.nix-prefetch-github}/bin/nix-prefetch-github
|
||||
$pg --json grantmcdermott jgd > versions/jgd.json
|
||||
$pg --json hannesdatta musicMetadata > versions/musicMetadata.json
|
||||
$pg --json nx10 httpgd > versions/httpgd.json
|
||||
$pg --json s3alfisc fwildclusterboot > versions/fwildclusterboot.json
|
||||
$pg --json s3alfisc summclust > versions/summclust.json
|
||||
$pg --json synth-inference synthdid > versions/synthdid.json
|
||||
RVER=$( wget -qO- 'https://raw.githubusercontent.com/ropensci/rix/refs/heads/main/inst/extdata/available_df.csv' | tail -n 1 | head -n 1 | cut -d',' -f4 | tr -d '"' )
|
||||
${pkgs.gnused}/bin/sed -i "s|nixpkgs.url = \"github:rstats-on-nix/nixpkgs/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\";|nixpkgs.url = \"github:rstats-on-nix/nixpkgs/$RVER\";|" flake.nix
|
||||
''
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"owner": "nx10",
|
||||
"repo": "httpgd",
|
||||
"rev": "087ebf5bbf46ddc52e107d6a8bb26381177d2e7f",
|
||||
"hash": "sha256-aEhrcWmDaqZn+fBHX/9/9VyJhYeHQKSSLaxeMQhzApA="
|
||||
"rev": "dd6ed3a687a2d7327bb28ca46725a0a203eb2a19",
|
||||
"hash": "sha256-vs6MTdVJXhTdzPXKqQR+qu1KbhF+vfyzZXIrFsuKMtU="
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"owner": "grantmcdermott",
|
||||
"repo": "jgd",
|
||||
"rev": "6a7b81cf22361366960f619fbbf46f893ab7583b",
|
||||
"hash": "sha256-OXamYYwyr2RHwsPmXlWr4tMxsLIbaGG/sl7QNpDZTnQ="
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue