From 1c5619312db77493cc07fd5ac991347e47638e5f Mon Sep 17 00:00:00 2001 From: Daniel Winkler Date: Sat, 23 May 2026 23:07:54 +1000 Subject: [PATCH] simplified --- flake.lock | 18 ------------------ flake.nix | 5 ----- overlays/r.nix | 1 - scripts/updater.nix | 14 -------------- scripts/updater.sh | 22 ---------------------- 5 files changed, 60 deletions(-) delete mode 100644 scripts/updater.nix delete mode 100644 scripts/updater.sh diff --git a/flake.lock b/flake.lock index 02745a6..0b89d7a 100644 --- a/flake.lock +++ b/flake.lock @@ -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" diff --git a/flake.nix b/flake.nix index 4c8df73..ee9c05c 100644 --- a/flake.nix +++ b/flake.nix @@ -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; diff --git a/overlays/r.nix b/overlays/r.nix index 14c02eb..18f01dd 100644 --- a/overlays/r.nix +++ b/overlays/r.nix @@ -11,5 +11,4 @@ in { baseRPackages = [ ]; rWrapper = rpkgs.rWrapper.override {packages = [ ];}; quarto = rpkgs.quarto.override {extraRPackages = [ ];}; - updateR = import ../scripts/updater.nix {pkgs = final;}; } diff --git a/scripts/updater.nix b/scripts/updater.nix deleted file mode 100644 index 063ec8d..0000000 --- a/scripts/updater.nix +++ /dev/null @@ -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; -} diff --git a/scripts/updater.sh b/scripts/updater.sh deleted file mode 100644 index ccf5e2e..0000000 --- a/scripts/updater.sh +++ /dev/null @@ -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