Add latex environment

- full texlive, because that's what most people expect
- tectonic is fairly lightweight if unused
- texlab for lsp support
This commit is contained in:
Yuval Kogman 2023-05-25 22:10:36 +03:00
parent f381b8a291
commit d9b5b3f2f1
5 changed files with 88 additions and 0 deletions

View file

@ -41,6 +41,7 @@ Once your preferred template has been initialized, you can use the provided shel
| [Hashicorp] tools | [`hashi`](./hashi/) | | [Hashicorp] tools | [`hashi`](./hashi/) |
| [Java] | [`java`](./java/) | | [Java] | [`java`](./java/) |
| [Kotlin] | [`kotlin`](./kotlin/) | | [Kotlin] | [`kotlin`](./kotlin/) |
| [LaTeX] | [`latex`](./latex/) |
| [Nickel] | [`nickel`](./nickel/) | | [Nickel] | [`nickel`](./nickel/) |
| [Nim] | [`nim`](./nim/) | | [Nim] | [`nim`](./nim/) |
| [Nix] | [`nix`](./nix/) | | [Nix] | [`nix`](./nix/) |
@ -135,6 +136,12 @@ The sections below list what each template includes. In all cases, you're free t
- [Kotlin] 1.7.10-release-333 - [Kotlin] 1.7.10-release-333
- [Gradle] 7.5 - [Gradle] 7.5
### [`latex`](./latex/)
- [texlive]
- [tectonic]
- [texlab]
### [`nickel`](./nickel/) ### [`nickel`](./nickel/)
- [Nickel] 0.2.0 - [Nickel] 0.2.0
@ -273,6 +280,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[iex]: https://hexdocs.pm/iex/IEx.html [iex]: https://hexdocs.pm/iex/IEx.html
[java]: https://java.com [java]: https://java.com
[kotlin]: https://kotlinlang.org [kotlin]: https://kotlinlang.org
[latex]: https://www.latex-project.org/
[leiningen]: https://leiningen.org [leiningen]: https://leiningen.org
[levant]: https://github.com/hashicorp/levant [levant]: https://github.com/hashicorp/levant
[lorri]: https://github.com/target/lorri [lorri]: https://github.com/target/lorri
@ -316,8 +324,11 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[statix]: https://github.com/nerdypepper/statix [statix]: https://github.com/nerdypepper/statix
[sbt]: https://www.scala-sbt.org [sbt]: https://www.scala-sbt.org
[spago]: https://github.com/purescript/spago [spago]: https://github.com/purescript/spago
[tectonic]: https://tectonic-typesetting.github.io/
[terraform]: https://terraform.io [terraform]: https://terraform.io
[terragrunt]: https://terragrunt.gruntwork.io [terragrunt]: https://terragrunt.gruntwork.io
[texlab]: https://github.com/latex-lsp/texlab
[texlive]: https://www.tug.org/texlive/
[tflint]: https://github.com/terraform-linters/tflint [tflint]: https://github.com/terraform-linters/tflint
[vault]: https://www.vaultproject.io [vault]: https://www.vaultproject.io
[virtualenv]: https://pypi.org/project/virtualenv [virtualenv]: https://pypi.org/project/virtualenv

View file

@ -65,6 +65,11 @@
description = "Kotlin development environment"; description = "Kotlin development environment";
}; };
latex = {
path = ./latex;
description = "LaTeX development environment";
};
nickel = { nickel = {
path = ./nickel; path = ./nickel;
description = "Nickel development environment"; description = "Nickel development environment";

1
latex/.envrc Normal file
View file

@ -0,0 +1 @@
use flake .

43
latex/flake.lock Normal file
View file

@ -0,0 +1,43 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1679163677,
"narHash": "sha256-VC0tc3EjJZFPXgucFQAYMIHce5nJWYR0kVCk4TVg6gg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c3912035d00ef755ab19394488b41feab95d2e40",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

28
latex/flake.nix Normal file
View file

@ -0,0 +1,28 @@
{
description = "A Nix-flake-based LaTeX development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{ self
, nixpkgs
, flake-utils
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
texlive.combined.scheme-full
texlab
tectonic
];
};
});
}