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 ###
|
||||
luatex.*/
|
||||
|
||||
### Nix ###
|
||||
result
|
||||
result/
|
57
flake.nix
57
flake.nix
|
@ -5,15 +5,56 @@ description = "LaTeX Beamer Presentation for GPUL Schools: Software Libre";
|
|||
flake-utils.url = github:numtide/flake-utils;
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system}; in
|
||||
{
|
||||
outputs = {
|
||||
self,
|
||||
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 {
|
||||
buildInputs = with pkgs; [
|
||||
texstudio
|
||||
texlive.combined.scheme-full
|
||||
];
|
||||
buildInputs = packages.document.buildInputs;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue