-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
38 lines (36 loc) · 941 Bytes
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
description = "RSR";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
flake-utils.lib.eachDefaultSystem (system:
with import nixpkgs { inherit system; };
let
R-with-my-packages = rWrapper.override {
packages = with rPackages; [
config
devtools
dplyr
keyring
pbapply
readr
tidyr
];
};
in {
devShells.default = mkShell {
buildInputs = [ R-with-my-packages ];
# From https://churchman.nl/tag/r/
shellHook = ''
mkdir -p "$(pwd)/_libs"
export R_LIBS_USER="$(pwd)/_libs"
'';
};
});
}