From b2d80fb9d9173aa997c4a8faaac94864fa8ea4ae Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Tue, 2 Apr 2019 11:59:09 +0200 Subject: [PATCH] Make FONTCONFIG setup for doc generation not interfere with emacs in nix-shell --- default.nix | 3 ++- guide/Makefile | 1 + shell.nix | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index 77c34a8b808..c360738ffe2 100644 --- a/default.nix +++ b/default.nix @@ -228,6 +228,7 @@ rec { "guide/" "guide/Makefile" "guide/.*css" + "guide/.*md" "guide/.*png" ]; @@ -238,7 +239,7 @@ rec { }; in [ pandoc tex bash ]; - FONTCONFIG_FILE = + NIX_FONTCONFIG_FILE = with nixpkgs; nixpkgs.makeFontsConf { fontDirectories = [ gyre-fonts inconsolata unifont lmodern lmmath ]; }; diff --git a/guide/Makefile b/guide/Makefile index 0a38acaf282..0461ed62ea1 100644 --- a/guide/Makefile +++ b/guide/Makefile @@ -37,6 +37,7 @@ TEX_OPTIONS=\ --include-in-header=<(echo '\newunicodechar{ツ}{\textrm{\textfallback{ツ}}}') \ actorscript-guide.pdf: ../design/guide.md + if [ -n "$$NIX_FONTCONFIG_FILE" ]; then export FONTCONFIG_FILE="$$NIX_FONTCONFIG_FILE"; fi; \ pandoc \ --toc \ --toc-depth 2 \ diff --git a/shell.nix b/shell.nix index ee4787bd8ba..3b3a968302c 100644 --- a/shell.nix +++ b/shell.nix @@ -21,6 +21,6 @@ nixpkgs.mkShell { default.users-guide.buildInputs ++ [ nixpkgs.ncurses ]; - FONTCONFIG_FILE = default.users-guide.FONTCONFIG_FILE; + NIX_FONTCONFIG_FILE = default.users-guide.NIX_FONTCONFIG_FILE; }