flake: add texlab to devshell
This commit is contained in:
parent
4fb979f78f
commit
bbcb2d7df2
1 changed files with 23 additions and 14 deletions
29
flake.nix
29
flake.nix
|
@ -1,21 +1,22 @@
|
|||
{
|
||||
description = "LaTeX Beamer Presentation for GPUL Schools: Software Libre";
|
||||
inputs = {
|
||||
nixpkgs.url = github:NixOS/nixpkgs/nixos-25.05;
|
||||
flake-utils.url = github:numtide/flake-utils;
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
tex = pkgs.texlive.combine {
|
||||
inherit
|
||||
(pkgs.texlive)
|
||||
inherit (pkgs.texlive)
|
||||
scheme-basic
|
||||
latex-bin
|
||||
latexmk
|
||||
|
@ -30,13 +31,21 @@
|
|||
;
|
||||
};
|
||||
# tex = pkgs.texliveFull;
|
||||
in rec {
|
||||
in
|
||||
rec {
|
||||
packages = {
|
||||
document = pkgs.stdenvNoCC.mkDerivation rec {
|
||||
name = "latex-beamer-gpul-schools-software-libre";
|
||||
src = self;
|
||||
buildInputs = [pkgs.coreutils tex];
|
||||
phases = ["unpackPhase" "buildPhase" "installPhase"];
|
||||
buildInputs = [
|
||||
pkgs.coreutils
|
||||
tex
|
||||
];
|
||||
phases = [
|
||||
"unpackPhase"
|
||||
"buildPhase"
|
||||
"installPhase"
|
||||
];
|
||||
buildPhase = ''
|
||||
export PATH="${pkgs.lib.makeBinPath buildInputs}";
|
||||
env TEXMFVAR=$(mktemp -d) \
|
||||
|
@ -54,7 +63,7 @@
|
|||
defaultPackage = packages.document;
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = packages.document.buildInputs;
|
||||
buildInputs = packages.document.buildInputs ++ (with pkgs; [ texlab ]);
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue