Skip to content

Commit

Permalink
Merge e4e1324 into 771d87f
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Dec 28, 2022
2 parents 771d87f + e4e1324 commit 85e9787
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 12 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/nix.yml
Expand Up @@ -19,7 +19,12 @@ jobs:
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
allowBroken = true
- name: Check flake
run: nix flake check
- name: Build flake
run: nix build
- name: Test run flake
- name: Test run in shell
run: nix shell -c sile --version
- name: Test run as flake
run: nix run . -- --version
8 changes: 6 additions & 2 deletions Makefile-fonts
@@ -1,3 +1,5 @@
if FONT_DOWNLOAD_TOOLS

.fonts: fonttooling
[ -h .fonts ] || mkdir -p $@

Expand All @@ -6,8 +8,8 @@

.PHONY: fonttooling
fonttooling:
$(if $(BSDTAR),,$(error Please set BSDTAR with path or ./configure --with-manual or --enable-developer))
$(if $(CURL),,$(error Please set CURL with path or ./configure --with-manual or --enable-developer))
$(if $(BSDTAR),,$(error Please set BSDTAR with path or `./configure --enable-developer`))
$(if $(CURL),,$(error Please set CURL with path or `./configure --enable-developer`))

# Don't let make delete things we had to download
.PRECIOUS: .fonts/% .sources/%
Expand Down Expand Up @@ -136,3 +138,5 @@ notobase = $(shell echo $(notdir $1) | sed -e 's/-.*//')
.fonts/Symbola%: .sources/Symbola.zip | .fonts
$(BSDTAR) -x -f $< -C $(dir $@) $(notdir $@) && \
touch $@

endif
10 changes: 7 additions & 3 deletions build-aux/ax_font.m4
Expand Up @@ -8,10 +8,14 @@ AC_DEFUN([AX_FONT], [
fi
pushdef([FONT],$1)
AC_MSG_CHECKING(whether font family FONT is available)
AS_IF([$FCMATCH "FONT" family | $GREP -qx "FONT"],[
AC_MSG_RESULT(yes)
AS_IF([test "$FCMATCH" = "true"],[
AC_MSG_RESULT(skip)
],[
AC_MSG_FAILURE([font family FONT not found])
AS_IF([$FCMATCH "FONT" family | $GREP -qx "FONT"],[
AC_MSG_RESULT(yes)
],[
AC_MSG_FAILURE([font family FONT not found])
])
])
popdef([FONT])
])dnl
8 changes: 5 additions & 3 deletions configure.ac
Expand Up @@ -55,6 +55,9 @@ AM_COND_IF([SYSTEM_LIBTEXPDF],
[AC_MSG_FAILURE([--with-system-libtexpdf was given, but test for libtexpdf failed])]) ],
[AC_CONFIG_SUBDIRS([libtexpdf])])

AM_CONDITIONAL([FONT_DOWNLOAD_TOOLS], [test -z ${DEVELOPER_TRUE} || (test -z ${MANUAL_TRUE} && test -z ${IS_SDIST_FALSE})])
AC_SUBST([FONT_DOWNLOAD_TOOLS])

AM_COND_IF([DEPENDENCY_CHECKS], [
AX_FONT(Gentium Plus)
Expand Down Expand Up @@ -158,14 +161,13 @@ AM_COND_IF([DEPENDENCY_CHECKS], [
])
# Required for downloading fonts for the manual and for tests
AM_COND_IF([MANUAL], [
# Since the source tarball includes a prebuilt manual we only need this for Git source builds
AM_COND_IF([FONT_DOWNLOAD_TOOLS], [
AX_PROGVAR([curl])
AX_PROGVAR([bsdtar])
])
AM_COND_IF([DEVELOPER], [
AX_PROGVAR([curl])
AX_PROGVAR([bsdtar])
AX_PROGVAR([busted])
AX_PROGVAR([luacheck])
AX_PROGVAR([luarocks])
Expand Down
8 changes: 5 additions & 3 deletions flake.nix
Expand Up @@ -38,7 +38,7 @@
version_rev = if (self ? rev) then (builtins.substring 0 7 self.rev) else "dirty";
# Prepare a different luaEnv to be used in the overridden expression,
# this is also the place to choose a different lua interpreter, such as
# lua5_3 or luajit
# lua5_4 or luajit
luaEnv = pkgs.lua5_3.withPackages(ps: with ps; [
cassowary
cldr
Expand Down Expand Up @@ -117,11 +117,13 @@
inherit (sile) checkInputs nativeBuildInputs;
buildInputs = sile.buildInputs ++ [
pkgs.libarchive
pkgs.perl
];
luaEnv = luaEnv + pkgs.lua5_3.withPackages(ps: with ps; [
pkgs.lua53Packages.busted
pkgs.lua53Packages.luacheck
pkgs.lua53Packages.luarocks
pkgs.perl
];
]);
};
};
packages.sile = sile;
Expand Down

0 comments on commit 85e9787

Please sign in to comment.