simplified

This commit is contained in:
Daniel Winkler 2026-05-23 23:07:54 +10:00
commit 1c5619312d
5 changed files with 0 additions and 60 deletions

18
flake.lock generated
View file

@ -52,23 +52,6 @@
"type": "github"
}
},
"plugins-r": {
"flake": false,
"locked": {
"lastModified": 1776905071,
"narHash": "sha256-dXox6qEs1VDE7vPNDoN8bY4g06uj1IEs6uki72w8lpA=",
"owner": "R-nvim",
"repo": "R.nvim",
"rev": "582f2af11290ac067e49018db38e12a511325556",
"type": "github"
},
"original": {
"owner": "R-nvim",
"ref": "v0.99.4",
"repo": "R.nvim",
"type": "github"
}
},
"r-nvim-nix": {
"inputs": {
"nixpkgs": [
@ -129,7 +112,6 @@
"fran": "fran",
"nixpkgs": "nixpkgs",
"plugins-cmp-pandoc-references": "plugins-cmp-pandoc-references",
"plugins-r": "plugins-r",
"r-nvim-nix": "r-nvim-nix",
"rixpkgs": "rixpkgs",
"wrappers": "wrappers"

View file

@ -25,11 +25,6 @@
};
};
"plugins-r" = {
url = "github:R-nvim/R.nvim/v0.99.4";
flake = false;
};
"plugins-cmp-pandoc-references" = {
url = "github:jmbuhr/cmp-pandoc-references";
flake = false;

View file

@ -11,5 +11,4 @@ in {
baseRPackages = [ ];
rWrapper = rpkgs.rWrapper.override {packages = [ ];};
quarto = rpkgs.quarto.override {extraRPackages = [ ];};
updateR = import ../scripts/updater.nix {pkgs = final;};
}

View file

@ -1,14 +0,0 @@
{pkgs}:
pkgs.writeShellApplication {
name = "updateR";
# Tools your script needs at runtime
runtimeInputs = [
pkgs.wget
pkgs.gnused
pkgs.coreutils
];
# Keep script in separate file, but embed contents
text = builtins.readFile ./updater.sh;
}

View file

@ -1,22 +0,0 @@
echo "📡 Fetching latest R version from rstats-on-nix..."
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 '"' )
# Validate RVER matches YYYY-MM-DD format
if [[ ! "$RVER" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "❌ Error: Failed to fetch valid R version date. Got: '$RVER'"
exit 1
fi
echo "✅ R date is $RVER"
# Create backup of flake.nix before modifying
cp flake.nix flake.nix.backup
# Update rixpkgs date in flake.nix
if 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; then
echo "✅ Updated rixpkgs date in flake.nix"
rm flake.nix.backup
else
echo "⚠️ Warning: Failed to update flake.nix, restoring backup"
mv flake.nix.backup flake.nix
fi