Skip to content

Commit 449fc79

Browse files
committed
migrate to nix for local dev
1 parent 1666c64 commit 449fc79

3 files changed

Lines changed: 32 additions & 5 deletions

File tree

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use_nix

Makefile

Lines changed: 0 additions & 5 deletions
This file was deleted.

shell.nix

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{ pkgs ? import <nixpkgs> {} }:
2+
3+
let
4+
resilientVersion = builtins.replaceStrings [ "\n" " " ] [ "" "" ]
5+
(builtins.readFile ./.resilient-version);
6+
7+
build = pkgs.writeShellScriptBin "build" ''
8+
exec sile --luarocks-tree lua_modules -u inputters.silm ddd-reference.silm "$@"
9+
'';
10+
in
11+
pkgs.mkShell {
12+
buildInputs = with pkgs; [
13+
sile
14+
lua5_1
15+
luarocks
16+
gcc
17+
gentium-plus
18+
build
19+
];
20+
21+
FONTCONFIG_FILE = pkgs.makeFontsConf {
22+
fontDirectories = [ pkgs.gentium-plus ];
23+
};
24+
25+
shellHook = ''
26+
echo "Installing resilient.sile ${resilientVersion}..."
27+
luarocks --lua-version 5.1 --tree lua_modules install resilient.sile ${resilientVersion}
28+
29+
echo "Run 'build' to generate the PDF."
30+
'';
31+
}

0 commit comments

Comments
 (0)