diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 88201428..52162a6f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -41,8 +41,24 @@ RUN apk add --no-cache \ rclone \ # ip / iproute2 needed by tailscaled iproute2 \ + # ── LaTeX + typesetting ─────────────────────────────────────────────────── + texlive-full \ + # ── Math / science CLI ──────────────────────────────────────────────────── + gnuplot \ + maxima \ + # wxmaxima requires a display; skip in headless image + octave \ + R \ && : +# ── Typst (static binary — not in Alpine apk) ──────────────────────────────── +RUN TYPST_VER=$(curl -fsSL https://api.github.com/repos/typst/typst/releases/latest \ + | grep '"tag_name"' | grep -oP 'v[\d.]+') \ + && curl -fsSL "https://github.com/typst/typst/releases/download/${TYPST_VER}/typst-x86_64-unknown-linux-musl.tar.xz" \ + | tar -xJ -C /tmp/ \ + && install -m 755 /tmp/typst-x86_64-unknown-linux-musl/typst /usr/local/bin/typst \ + && rm -rf /tmp/typst-x86_64-unknown-linux-musl + # ── Tailscale (static binary — userspace networking, no root required) ──────── RUN TSVER=$(curl -fsSL https://pkgs.tailscale.com/stable/ \ | grep -oP 'tailscale_\K[0-9]+\.[0-9]+\.[0-9]+(?=_amd64\.tgz)' \ @@ -101,6 +117,16 @@ RUN uv pip install --python /home/researcher/venv/bin/python3 \ # Numerics numpy \ scipy \ + # Arbitrary-precision arithmetic + mpmath \ + # Plotting / visualisation + matplotlib \ + seaborn \ + # Data frames + pandas \ + polars \ + # Machine learning + scikit-learn \ # Search / web beautifulsoup4 \ lxml \ diff --git a/flake.nix b/flake.nix index c2b52f17..8293d67d 100644 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,16 @@ numpy scipy sympy + # Arbitrary-precision arithmetic + mpmath + # Plotting / visualisation + matplotlib + seaborn + # Data frames + pandas + polars + # Machine learning + scikit-learn # Web scraping beautifulsoup4 lxml @@ -55,7 +65,28 @@ urllib3 ]); - # ── Dev shell packages ────────────────────────────────────────────────── + # ── R environment with tidyverse + ggplot2 ───────────────────────────── + rEnv = pkgs.rWrapper.override { + packages = with pkgs.rPackages; [ + tidyverse + ggplot2 + dplyr + tidyr + readr + purrr + stringr + forcats + lubridate + # Statistical extras + MASS + Matrix + survival + # Output + knitr + rmarkdown + ]; + }; + devPkgs = with pkgs; [ # Version control git @@ -117,6 +148,19 @@ # pkg-config for Rust native dependency discovery (openssl-sys, etc.) pkg-config openssl + # ── LaTeX ────────────────────────────────────────────────────────────── + # texliveFull: complete TeX Live distribution (~5 GB) — every package + # pre-cached in the image so latex/xelatex/lualatex/latexmk all work + # offline. Use texliveMedium to trade completeness for image size. + texliveFull + # ── Math / science CLI ───────────────────────────────────────────────── + gnuplot # publication-quality 2-D/3-D scientific plotting + maxima # full CAS: symbolic algebra, calculus, ODEs + wxmaxima # GUI front-end for maxima + octave # GNU Octave — MATLAB-compatible numerics + rEnv # R + tidyverse / ggplot2 (see rEnv binding above) + # ── Typesetting ──────────────────────────────────────────────────────── + typst # modern markup-based typesetting (LaTeX alternative) ]; # ── customEtc provides standard etc configuration with researcher user ── @@ -166,7 +210,7 @@ User = "1000"; WorkingDir = "/home/researcher/stack"; Env = [ - "PATH=/home/researcher/.elan/bin:${pythonEnv}/bin:${pkgs.uv}/bin:${pkgs.git}/bin:${pkgs.ripgrep}/bin:${pkgs.jq}/bin:${pkgs.coreutils}/bin:${pkgs.bashInteractive}/bin:${pkgs.binutils}/bin:${pkgs.glibc.bin}/bin:${pkgs.gzip}/bin:${pkgs.pkg-config}/bin:${pkgs.openssl.bin}/bin:/usr/bin:/bin" + "PATH=/home/researcher/.elan/bin:${pythonEnv}/bin:${pkgs.uv}/bin:${pkgs.git}/bin:${pkgs.ripgrep}/bin:${pkgs.jq}/bin:${pkgs.coreutils}/bin:${pkgs.bashInteractive}/bin:${pkgs.binutils}/bin:${pkgs.glibc.bin}/bin:${pkgs.gzip}/bin:${pkgs.pkg-config}/bin:${pkgs.openssl.bin}/bin:${pkgs.texliveFull}/bin:${pkgs.typst}/bin:${pkgs.gnuplot}/bin:${pkgs.maxima}/bin:${pkgs.octave}/bin:${rEnv}/bin:/usr/bin:/bin" "LD_LIBRARY_PATH=${pkgs.gcc.cc.lib}/lib:${pkgs.glibc}/lib:${pkgs.libglvnd}/lib:${pkgs.xorg.libX11}/lib:${pkgs.xorg.libXext}/lib:${pkgs.xorg.libXrender}/lib:${pkgs.mesa}/lib:${pkgs.openssl}/lib" "PYTHONUNBUFFERED=1" "XDG_CACHE_HOME=/home/researcher/.cache"