mirror of
https://github.com/dwinkler1/fran.git
synced 2026-02-19 22:50:59 -05:00
Compare commits
No commits in common. "main" and "copilot/refactor-package-modules-structure" have entirely different histories.
main
...
copilot/re
9 changed files with 48 additions and 85 deletions
8
flake.lock
generated
8
flake.lock
generated
|
|
@ -2,16 +2,16 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771246459,
|
"lastModified": 1762778295,
|
||||||
"narHash": "sha256-r93GMW+p1/jjgaDU9Dadvo2lOcj6a8oza6QayP5ojYk=",
|
"narHash": "sha256-5Ogu11rMpc3ytcfBLwO3O1l1MJl0pTT+uCz/OJixmVo=",
|
||||||
"owner": "rstats-on-nix",
|
"owner": "rstats-on-nix",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b56df64c453105d8e4ebaa0cefd7acd357685fb0",
|
"rev": "b37b5950aa970ed7abe27144f2ca62e6029215e5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "rstats-on-nix",
|
"owner": "rstats-on-nix",
|
||||||
"ref": "2026-02-16",
|
"ref": "2025-11-10",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
27
flake.nix
27
flake.nix
|
|
@ -2,7 +2,7 @@
|
||||||
description = "FRAN - The Flakey R Archiving Network";
|
description = "FRAN - The Flakey R Archiving Network";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:dwinkler1/rixpkgs/nixpkgs";
|
nixpkgs.url = "github:rstats-on-nix/nixpkgs/2025-11-10";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
|
@ -78,34 +78,9 @@
|
||||||
franUpdate
|
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 = {
|
nixConfig = {
|
||||||
extra-substituters = [
|
extra-substituters = [
|
||||||
"https://rstats-on-nix.cachix.org"
|
"https://rstats-on-nix.cachix.org"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
final,
|
final,
|
||||||
prev,
|
prev,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
# Shared helper function to fetch from GitHub using JSON version files
|
# Shared helper function to fetch from GitHub using JSON version files
|
||||||
fetchfromGitHubJSONFile = path: prev.fetchFromGitHub (builtins.fromJSON (builtins.readFile path));
|
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)
|
# Arguments for packages that need access to 'final' (for cross-package dependencies)
|
||||||
argsWithFinal =
|
argsWithFinal = baseArgs // {
|
||||||
baseArgs
|
inherit final;
|
||||||
// {
|
};
|
||||||
inherit final;
|
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
## F
|
## F
|
||||||
fwildclusterboot = import ./f/fwildclusterboot.nix argsWithFinal;
|
fwildclusterboot = import ./f/fwildclusterboot.nix argsWithFinal;
|
||||||
|
|
||||||
## J
|
## H
|
||||||
jgd = import ./j/jgd.nix (baseArgs // {lib = prev.lib;});
|
httpgd = import ./h/httpgd.nix baseArgs;
|
||||||
|
|
||||||
## M
|
## M
|
||||||
musicMetadata = import ./m/musicMetadata.nix baseArgs;
|
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("Testing\n")
|
||||||
cat("\n============================================================ jgd =========================================================================\n")
|
|
||||||
library(jgd)
|
|
||||||
jgd()
|
|
||||||
|
|
||||||
cat("\n============================================================ fwildclusterboot ============================================================\n")
|
cat("\n============================================================ fwildclusterboot ============================================================\n")
|
||||||
library(fwildclusterboot)
|
library(fwildclusterboot)
|
||||||
data(voters)
|
data(voters)
|
||||||
|
|
@ -34,6 +30,10 @@ summary(boot_lm)
|
||||||
summary(boot_lmjl)
|
summary(boot_lmjl)
|
||||||
summary(boot_lmjl2)
|
summary(boot_lmjl2)
|
||||||
|
|
||||||
|
cat("\n============================================================ httpgd ============================================================\n")
|
||||||
|
library(httpgd)
|
||||||
|
hgd()
|
||||||
|
|
||||||
cat("\n============================================================ musicMetadata ============================================================\n")
|
cat("\n============================================================ musicMetadata ============================================================\n")
|
||||||
library(musicMetadata)
|
library(musicMetadata)
|
||||||
print(classify_labels('Interscope'))
|
print(classify_labels('Interscope'))
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,8 @@
|
||||||
pkgs: ''
|
pkgs: ''
|
||||||
pg=${pkgs.nix-prefetch-github}/bin/nix-prefetch-github
|
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 hannesdatta musicMetadata > versions/musicMetadata.json
|
||||||
$pg --json nx10 httpgd > versions/httpgd.json
|
$pg --json nx10 httpgd > versions/httpgd.json
|
||||||
$pg --json s3alfisc fwildclusterboot > versions/fwildclusterboot.json
|
$pg --json s3alfisc fwildclusterboot > versions/fwildclusterboot.json
|
||||||
$pg --json s3alfisc summclust > versions/summclust.json
|
$pg --json s3alfisc summclust > versions/summclust.json
|
||||||
$pg --json synth-inference synthdid > versions/synthdid.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
|
|
||||||
''
|
''
|
||||||
|
|
|
||||||
6
versions/httpgd.json
Normal file
6
versions/httpgd.json
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"owner": "nx10",
|
||||||
|
"repo": "httpgd",
|
||||||
|
"rev": "dd6ed3a687a2d7327bb28ca46725a0a203eb2a19",
|
||||||
|
"hash": "sha256-vs6MTdVJXhTdzPXKqQR+qu1KbhF+vfyzZXIrFsuKMtU="
|
||||||
|
}
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"owner": "grantmcdermott",
|
|
||||||
"repo": "jgd",
|
|
||||||
"rev": "e51385ed656618ed3d2611c0ccc1feff22bf4e11",
|
|
||||||
"hash": "sha256-rWn8DVvH7JapCs1i0jQQQsWm00JPNUolVygcfDsSV1k="
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue