pkgs: add moloch(-dragon)
This commit is contained in:
parent
0a6e9704e6
commit
5b50a91cb5
|
@ -56,4 +56,8 @@ final: prev: {
|
|||
pympress = prev.pympress.overrideDerivation (oldAttrs: {
|
||||
patches = [ ./pkgs/python/pympress/0001-Fix-KDE-window-icon.patch ];
|
||||
});
|
||||
|
||||
texliveDragonPackages = {
|
||||
moloch = prev.callPackage ./pkgs/tex/moloch {};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
{
|
||||
fetchFromGitea,
|
||||
writeShellScript,
|
||||
writableTmpDirAsHomeHook,
|
||||
|
||||
stdenvNoCC,
|
||||
|
||||
texlivePackages,
|
||||
texliveBasic,
|
||||
}:
|
||||
let
|
||||
texEnv = texliveBasic.withPackages (ps: with ps; [
|
||||
# l3build
|
||||
beamer
|
||||
biblatex
|
||||
enumitem
|
||||
fileinfo
|
||||
hypdoc
|
||||
hyperref
|
||||
listings
|
||||
metalogo
|
||||
parskip
|
||||
pgf
|
||||
pgfopts
|
||||
setspace
|
||||
xurl
|
||||
microtype
|
||||
|
||||
latexmk
|
||||
]);
|
||||
in stdenvNoCC.mkDerivation rec {
|
||||
pname = "moloch";
|
||||
version = "1.0.2-DEV-xenia";
|
||||
|
||||
outputs = [
|
||||
"tex"
|
||||
"texdoc"
|
||||
];
|
||||
|
||||
passthru.tlDeps = with texlivePackages; [ latex ];
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "git.lain.faith";
|
||||
owner = "haskal";
|
||||
repo = "${pname}-dragon";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-eMlhJj4a2HTDhDzkS9KR+d76lt81iH7x//WZOA39tno=";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
texEnv
|
||||
|
||||
# multiple-outputs.sh fails if $out is not defined
|
||||
(writeShellScript "force-tex-output.sh" ''
|
||||
out="''${tex-}"
|
||||
'')
|
||||
|
||||
writableTmpDirAsHomeHook # Need a writable $HOME for latexmk
|
||||
];
|
||||
|
||||
# we just build manually, but moloch's own method of building is using l3build
|
||||
# i have no idea how to get that working, so for now just do it normal style
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
# Generate the style files
|
||||
cd src
|
||||
latex beamertheme${pname}.ins
|
||||
|
||||
# Generate the documentation
|
||||
cp ../doc/${pname}.tex .
|
||||
latexmk -pdf ${pname}.tex
|
||||
|
||||
cd ..
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
path="$tex/tex/latex/${pname}"
|
||||
mkdir -p "$path"
|
||||
cp src/*.{cls,def,clo,sty} "$path/"
|
||||
|
||||
path="$texdoc/doc/tex/latex/${pname}"
|
||||
mkdir -p "$path"
|
||||
cp src/${pname}.pdf "$path/"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
|
@ -3,10 +3,11 @@
|
|||
|
||||
outputs = { self, dragnpkgs } @ inputs: dragnpkgs.lib.mkFlake {
|
||||
# Define a texlive environment to use
|
||||
packages.texlive-custom = { texliveMedium }: texliveMedium.withPackages (ps: with ps; [
|
||||
fontawesome5
|
||||
moloch
|
||||
]);
|
||||
packages.texlive-custom = { texliveMedium, texliveDragonPackages }:
|
||||
texliveMedium.withPackages (ps: with ps; [
|
||||
fontawesome5
|
||||
texliveDragonPackages.moloch
|
||||
]);
|
||||
|
||||
# Package definition for building the PDF
|
||||
packages.default = { system, stdenvNoCC }: stdenvNoCC.mkDerivation rec {
|
||||
|
|
|
@ -9,13 +9,8 @@
|
|||
\usefonttheme[onlymath]{serif}
|
||||
|
||||
|
||||
% set up note slides formatted for pympress by default
|
||||
% this can be commented out to produce a slide deck with no notes
|
||||
\setbeameroption{show notes}
|
||||
\addtobeamertemplate{note page}{}{\thispdfpagelabel{notes:\insertframenumber}}
|
||||
|
||||
% the modern way to restart appendix page numbering (instead of using a package)
|
||||
\setbeamertemplate{page number in head/foot}[appendixframenumber]
|
||||
|
||||
|
||||
% useful tikz styles from previous slide decks
|
||||
|
@ -55,12 +50,14 @@
|
|||
},
|
||||
}
|
||||
|
||||
|
||||
\title{My Beamer Presentation}
|
||||
\subtitle{(From the template)}
|
||||
\author{You}
|
||||
\institute{Institute of Swag Nix Templates}
|
||||
\date{Now}
|
||||
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
@ -74,13 +71,13 @@
|
|||
Sample text
|
||||
\end{frame}
|
||||
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Some Other Slide Title}
|
||||
|
||||
Sample text 2
|
||||
\end{frame}
|
||||
|
||||
|
||||
\appendix
|
||||
|
||||
\begin{frame}[standout]
|
||||
|
|
Loading…
Reference in New Issue