Skip to content

Commit

Permalink
Merge pull request #1495 from pchabros/r-radian-console
Browse files Browse the repository at this point in the history
R: add radian console
  • Loading branch information
domenkozar authored Oct 5, 2024
2 parents 4549e9e + 85e1a71 commit cc562bf
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 5 deletions.
51 changes: 49 additions & 2 deletions docs/reference/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -5226,6 +5226,53 @@ package



## languages.r.radian.enable



Whether to enable a 21 century R console.



*Type:*
boolean



*Default:*
` false `



*Example:*
` true `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/r.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/r.nix)



## languages.r.radian.package



The radian package to use.



*Type:*
package



*Default:*
` pkgs.radianWrapper `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/r.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/r.nix)



## languages.racket.enable


Expand Down Expand Up @@ -7675,8 +7722,6 @@ list of (one of “commit-msg”, “post-checkout”, “post-commit”, “pos

## pre-commit.hooks.\<name>.types



List of file types to run on. See [Filtering files with types](https://pre-commit.com/\#filtering-files-with-types).


Expand Down Expand Up @@ -7722,6 +7767,8 @@ list of string

## pre-commit.hooks.\<name>.verbose



forces the output of the hook to be printed even when the hook passes.


Expand Down
41 changes: 41 additions & 0 deletions docs/supported-languages/r.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,44 @@ package

*Default:*
` pkgs.R `



## languages\.r\.radian\.enable



Whether to enable a 21 century R console\.



*Type:*
boolean



*Default:*
` false `



*Example:*
` true `



## languages\.r\.radian\.package



The radian package to use\.



*Type:*
package



*Default:*
` pkgs.radianWrapper `
11 changes: 11 additions & 0 deletions examples/r/devenv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ pkgs, ... }:

{
languages.r = {
enable = true;
radian = {
enable = true;
package = pkgs.python312Packages.radian;
};
};
}
13 changes: 10 additions & 3 deletions src/modules/languages/r.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,18 @@ in
defaultText = lib.literalExpression "pkgs.R";
description = "The R package to use.";
};
radian = {
enable = lib.mkEnableOption "a 21 century R console";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.radianWrapper;
defaultText = lib.literalExpression "pkgs.radianWrapper";
description = "The radian package to use.";
};
};
};

config = lib.mkIf cfg.enable {
packages = with pkgs; [
cfg.package
];
packages = with pkgs; [ cfg.package ] ++ lib.lists.optional cfg.radian.enable cfg.radian.package;
};
}

0 comments on commit cc562bf

Please sign in to comment.