mirror of
https://github.com/kenryuS/report-temp.git
synced 2026-06-15 00:36:13 +09:00
65 lines
1.6 KiB
Nix
65 lines
1.6 KiB
Nix
{
|
|
description = "LaTeX Assignment Template";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
eskk-vim = {
|
|
url = "github:vim-skk/eskk.vim";
|
|
flake = false;
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils, eskk-vim }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
name = "report";
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config = {};
|
|
overlays = import ./nix/overlay.nix { inherit pkgs; eskk-vim-src = eskk-vim; };
|
|
};
|
|
|
|
vimWithTex = import ./nix/vim.nix { inherit pkgs; lib = pkgs.lib; };
|
|
texEnv = import ./nix/latex.nix { inherit pkgs; };
|
|
|
|
basePackages = [
|
|
texEnv
|
|
pkgs.qpdf
|
|
pkgs.qpdfview
|
|
];
|
|
in
|
|
{
|
|
templates = {
|
|
latex = {
|
|
path = ./templates/latex;
|
|
description = "Template for LaTeX";
|
|
};
|
|
pandoc = {
|
|
path = ./templates/pandoc;
|
|
description = "Template for Pandoc Markdown";
|
|
};
|
|
};
|
|
devShells.default = self.devShells.${system}.latex;
|
|
devShells.latex = pkgs.stdenv.mkDerivation {
|
|
inherit name;
|
|
shellHook = ''
|
|
export PS1="${name} \w \$ "
|
|
'';
|
|
buildInputs = basePackages ++ [
|
|
vimWithTex
|
|
];
|
|
};
|
|
devShells.pandoc = pkgs.stdenv.mkDerivation {
|
|
inherit name;
|
|
shellHook = ''
|
|
export PS1="${name} pandoc \w \$ "
|
|
'';
|
|
buildInputs = basePackages ++ [
|
|
pkgs.pandoc
|
|
];
|
|
};
|
|
}
|
|
);
|
|
}
|