mirror of
https://github.com/dwinkler1/np.git
synced 2026-02-19 22:40:57 -05:00
Add clarifying comments based on code review feedback
Co-authored-by: dwinkler1 <22460147+dwinkler1@users.noreply.github.com>
This commit is contained in:
parent
496c238a12
commit
cc69aa34f8
3 changed files with 6 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ in ''
|
||||||
echo "${shellCmds}"
|
echo "${shellCmds}"
|
||||||
echo "=========================================================================="
|
echo "=========================================================================="
|
||||||
echo ""
|
echo ""
|
||||||
|
# Auto-activate devenv shell if devenv.nix exists (can be disabled in config)
|
||||||
${pkgs.lib.optionalString enabledPackages.devenv "${defaultPackageName}-activateDevenv"}
|
${pkgs.lib.optionalString enabledPackages.devenv "${defaultPackageName}-activateDevenv"}
|
||||||
echo ""
|
echo ""
|
||||||
''
|
''
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ final: prev: let
|
||||||
++ (with final.extraRPackages; [
|
++ (with final.extraRPackages; [
|
||||||
httpgd
|
httpgd
|
||||||
])
|
])
|
||||||
|
# Import custom R packages from project root if file exists
|
||||||
|
# Users can create r-packages.nix in their project to add more packages
|
||||||
++ (prev.lib.optional (builtins.pathExists ./r-packages.nix) (import ./r-packages.nix final.rpkgs));
|
++ (prev.lib.optional (builtins.pathExists ./r-packages.nix) (import ./r-packages.nix final.rpkgs));
|
||||||
in {
|
in {
|
||||||
quarto = final.rpkgs.quarto.override {extraRPackages = reqPkgs;};
|
quarto = final.rpkgs.quarto.override {extraRPackages = reqPkgs;};
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,11 @@ set -euo pipefail
|
||||||
|
|
||||||
echo "🔄 Updating project dependencies..."
|
echo "🔄 Updating project dependencies..."
|
||||||
|
|
||||||
|
# Fetch latest R version from rstats-on-nix
|
||||||
|
# This command chain: downloads CSV, extracts last line, gets 4th field (date), removes quotes
|
||||||
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 '"' ) &&\
|
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 '"' ) &&\
|
||||||
|
|
||||||
|
# Update rixpkgs date in flake.nix
|
||||||
sed -i "s|rixpkgs.url = \"github:rstats-on-nix/nixpkgs/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\";|rixpkgs.url = \"github:rstats-on-nix/nixpkgs/$RVER\";|" flake.nix
|
sed -i "s|rixpkgs.url = \"github:rstats-on-nix/nixpkgs/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\";|rixpkgs.url = \"github:rstats-on-nix/nixpkgs/$RVER\";|" flake.nix
|
||||||
echo "✅ R date is $RVER"
|
echo "✅ R date is $RVER"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue