mirror of
https://github.com/dwinkler1/fran.git
synced 2026-02-19 22:50:59 -05:00
added jgd
This commit is contained in:
parent
fe5868d574
commit
c46bc7dea5
6 changed files with 79 additions and 14 deletions
25
flake.nix
25
flake.nix
|
|
@ -78,9 +78,34 @@
|
||||||
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,8 +1,7 @@
|
||||||
{
|
{
|
||||||
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));
|
||||||
|
|
||||||
|
|
@ -15,7 +14,9 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
# 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 = baseArgs // {
|
argsWithFinal =
|
||||||
|
baseArgs
|
||||||
|
// {
|
||||||
inherit final;
|
inherit final;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
|
@ -25,6 +26,9 @@ in {
|
||||||
## H
|
## H
|
||||||
httpgd = import ./h/httpgd.nix baseArgs;
|
httpgd = import ./h/httpgd.nix baseArgs;
|
||||||
|
|
||||||
|
## J
|
||||||
|
jgd = import ./j/jgd.nix (baseArgs // {lib = prev.lib;});
|
||||||
|
|
||||||
## M
|
## M
|
||||||
musicMetadata = import ./m/musicMetadata.nix baseArgs;
|
musicMetadata = import ./m/musicMetadata.nix baseArgs;
|
||||||
|
|
||||||
|
|
|
||||||
25
packages/j/jgd.nix
Normal file
25
packages/j/jgd.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
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,4 +1,8 @@
|
||||||
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)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
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
|
||||||
|
|
|
||||||
6
versions/jgd.json
Normal file
6
versions/jgd.json
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"owner": "grantmcdermott",
|
||||||
|
"repo": "jgd",
|
||||||
|
"rev": "ec39bb7f9cf56727d4c47990bca02cd3256efcfc",
|
||||||
|
"hash": "sha256-ceJUPVRPZMwIeth7gfv8ULXAEzeQ2KRoqEhtp5rIGrw="
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue