Skip to content

Instantly share code, notes, and snippets.

@MikaelFangel
Created November 15, 2023 18:18
Show Gist options
  • Save MikaelFangel/7c46feb534c9f1f591aac2c6e9c32785 to your computer and use it in GitHub Desktop.
Save MikaelFangel/7c46feb534c9f1f591aac2c6e9c32785 to your computer and use it in GitHub Desktop.
R development flake for direnv
{
description = "A basic flake with a shell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell {
nativeBuildInputs = [ pkgs.bashInteractive ];
buildInputs = with pkgs; [
R
rstudio
rPackages.rmarkdown
rPackages.knitr
rPackages.tidyverse
rPackages.tidytext
];
};
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment