diff --git a/flake.lock b/flake.lock index bf24a07..6de8fa5 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "fibeamer": { + "flake": false, + "locked": { + "lastModified": 1632472447, + "narHash": "sha256-iITRsfepm6ZnHs7rPKPp4aPhb2Y9PKfR8JcbPvHJiTk=", + "owner": "Witiko", + "repo": "fibeamer", + "rev": "8c1ff9e80a8f7d83239686d8fec520592ace5366", + "type": "github" + }, + "original": { + "owner": "Witiko", + "repo": "fibeamer", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -36,6 +52,7 @@ }, "root": { "inputs": { + "fibeamer": "fibeamer", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } diff --git a/flake.nix b/flake.nix index 693e09a..3bfdf30 100644 --- a/flake.nix +++ b/flake.nix @@ -1,54 +1,42 @@ # flake.nix { - description = "LuaLaTeX compilation environment"; + description = "LaTeX compilation environment for thesis and beamer presentation"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; + fibeamer = { + url = "github:Witiko/fibeamer"; + flake = false; + }; }; - outputs = { self, nixpkgs, flake-utils }: + outputs = { self, nixpkgs, flake-utils, fibeamer }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; - texlive = pkgs.texlive.combine { - inherit (pkgs.texlive) - scheme-medium - luatex - latex-bin - latexmk - # Add additional packages as needed: - # amsmath - # fontspec - # unicode-math - # microtype - # geometry - # hyperref - # graphicx - # xcolor - ; + inherit (pkgs.texlive) scheme-full; }; + + # Build a TEXMF tree for fibeamer so LaTeX can find it + fibeamerTexmf = pkgs.runCommand "fibeamer-texmf" {} '' + mkdir -p $out/tex/latex/fibeamer + cp -r ${fibeamer}/* $out/tex/latex/fibeamer/ + ''; in { devShells.default = pkgs.mkShell { - name = "lualatex-env"; + name = "latex-env"; buildInputs = [ texlive - pkgs.lua5_3 + pkgs.biber ]; - shellHook = '' - echo "LuaLaTeX environment loaded" - echo "Available: lualatex, latexmk, luatex" - lualatex --version | head -1 + export TEXMFHOME="${fibeamerTexmf}:" + echo "LaTeX environment loaded (pdflatex + biber + fibeamer)" + pdflatex --version | head -1 ''; }; - - # App for direct compilation - apps.default = { - type = "app"; - program = "${texlive}/bin/lualatex"; - }; }); }