From 2d2ae44216ca2ac9454329c468dc6361bdee7cdd Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Fri, 9 Feb 2024 03:49:37 +0300 Subject: [PATCH] Flake : Add devShell for building. --- flake.lock | 27 ++++++++++++++++++++++++++ flake.nix | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..581619f --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1707092692, + "narHash": "sha256-ZbHsm+mGk/izkWtT4xwwqz38fdlwu7nUUKXTOmm4SyE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "faf912b086576fd1a15fca610166c98d47bc667e", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..bb31d61 --- /dev/null +++ b/flake.nix @@ -0,0 +1,56 @@ +{ + description = "LuaLaTeX build env."; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs } @inputs: + let + system = "x86_64-linux"; + lib = nixpkgs.lib; + pkgs = nixpkgs.legacyPackages.${system}; + tex = (pkgs.texlive.combine { + inherit (pkgs.texlive) scheme-basic + amsmath + babel + capt-of + catchfile + collection-fontsextra + cyrillic + dvipng + dvisvgm + environ + etoolbox + fancyhdr + fontspec + geometry + hyperref + listofitems + luacode + luatexbase + montserrat + parskip + pgf + tcolorbox + tocloft + ulem + wrapfig + xcolor; + + #(setq org-latex-compiler "lualatex") + #(setq org-preview-latex-default-process 'dvisvgm) + }); + in { + devShells.${system} = { + default = pkgs.mkShell rec { + nativeBuildInputs = with pkgs; [ + gnumake + imagemagick + tex + ]; + buildInputs = with pkgs; []; + }; + }; + }; +}