Skip to content

Commit 38e34f3

Browse files
committed
fix : set XDG_CACHE_HOME=/tmp/nix-shell.mNvbUY for LaTeX & avoid doc/latex/ dir & add missing lato font dependency
1 parent 3e47233 commit 38e34f3

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

default.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
, wrapQtAppsHook
1313
, fetchzip
1414
, runCommand
15+
, withDoc ? true
1516
, withPortabilityTweaks ? false
1617
}:
1718

@@ -45,7 +46,7 @@ stdenv.mkDerivation {
4546
wrapQtAppsHook
4647
pdf2svg
4748
(texlive.combine {
48-
inherit (texlive) scheme-small standalone pgfplots unicode-math;
49+
inherit (texlive) scheme-small standalone pgfplots unicode-math lato;
4950
# https://ctan.org/tex-archive/fonts/lete-sans-math
5051
# TODO use buildTeXLivePackage
5152
# lete-sans-math = pkgs.texlivePackages.buildTeXLivePackage {
@@ -102,6 +103,11 @@ stdenv.mkDerivation {
102103
export CPM_DISABLE=ON
103104
'';
104105

106+
postBuild = lib.optionals withDoc ''
107+
export XDG_CACHE_HOME=$TMPDIR
108+
make doc
109+
'';
110+
105111
postInstall = lib.optionals stdenv.hostPlatform.isWindows ''
106112
mkdir -p $out/bin/platforms
107113
ln -t $out/bin/platforms -s ${qtbase}/lib/qt-6/plugins/platforms/qwindows.dll

doc/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ add_custom_target( doc )
33
if( CMakeUtils_Latex_FOUND AND PDF2SVG )
44
compile_latex_file( "interval"
55
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/interval.svg"
6-
SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/latex"
7-
TEXINPUTS "${CMAKE_CURRENT_SOURCE_DIR}/latex"
6+
TEXINPUTS "${CMAKE_CURRENT_SOURCE_DIR}"
87
REGISTER_TO "INTERVAL_FILES"
98
SHELL_ESCAPE
109
)
@@ -15,7 +14,7 @@ configure_file_build_time(
1514
"${CMAKE_CURRENT_BINARY_DIR}/interval.md"
1615
@ONLY
1716
VARS
18-
INTERVAL_SVG "./latex/interval.svg"
17+
INTERVAL_SVG "./interval.svg"
1918
)
2019

2120
add_custom_target( interval
File renamed without changes.

0 commit comments

Comments
 (0)