Add package to flake
This commit is contained in:
parent
5d4ec980a2
commit
0b4930574b
2 changed files with 54 additions and 9 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -320,3 +320,7 @@ TSWLatexianTemp*
|
||||||
|
|
||||||
### lualatex ###
|
### lualatex ###
|
||||||
luatex.*/
|
luatex.*/
|
||||||
|
|
||||||
|
### Nix ###
|
||||||
|
result
|
||||||
|
result/
|
59
flake.nix
59
flake.nix
|
@ -1,19 +1,60 @@
|
||||||
{
|
{
|
||||||
description = "LaTeX Beamer Presentation for GPUL Schools: Software Libre";
|
description = "LaTeX Beamer Presentation for GPUL Schools: Software Libre";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = github:NixOS/nixpkgs/nixos-25.05;
|
nixpkgs.url = github:NixOS/nixpkgs/nixos-25.05;
|
||||||
flake-utils.url = github:numtide/flake-utils;
|
flake-utils.url = github:numtide/flake-utils;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = {
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
self,
|
||||||
let pkgs = nixpkgs.legacyPackages.${system}; in
|
nixpkgs,
|
||||||
{
|
flake-utils,
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (
|
||||||
|
system: let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
tex = pkgs.texlive.combine {
|
||||||
|
inherit
|
||||||
|
(pkgs.texlive)
|
||||||
|
scheme-basic
|
||||||
|
latex-bin
|
||||||
|
latexmk
|
||||||
|
collection-langspanish
|
||||||
|
beamer
|
||||||
|
biblatex
|
||||||
|
biber
|
||||||
|
csquotes
|
||||||
|
emoji
|
||||||
|
fontspec
|
||||||
|
noto-emoji
|
||||||
|
;
|
||||||
|
};
|
||||||
|
# tex = pkgs.texliveFull;
|
||||||
|
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"];
|
||||||
|
buildPhase = ''
|
||||||
|
export PATH="${pkgs.lib.makeBinPath buildInputs}";
|
||||||
|
env TEXMFVAR=$(mktemp -d) \
|
||||||
|
SOURCE_DATE_EPOCH=${toString self.lastModified} \
|
||||||
|
latexmk -interaction=nonstopmode -pdf -lualatex \
|
||||||
|
-pretex="\pdfvariable suppressoptionalinfo 512\relax" \
|
||||||
|
-usepretex main.tex
|
||||||
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp main.pdf $out/
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
defaultPackage = packages.document;
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = packages.document.buildInputs;
|
||||||
texstudio
|
|
||||||
texlive.combined.scheme-full
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue