forked from dtekcth/dTeX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
43 lines (38 loc) · 850 Bytes
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ pkgs ? import <nixpkgs> {} }:
let
inherit (pkgs)
callPackage
buildEnv
stdenv
texlive
;
# HACK: Not sure if there is a proper way to do this
# We want to make our package mutable during development
src = "/path/to/project/root/src";
dTeX = (callPackage ./default.nix { }).overrideDTeX (oldDTeX: {
version = "live";
installPhase = ''
mkdir -p $out/tex/latex/dTeX
for file in $(find * -mindepth 1 -maxdepth 1)
do
ln -s ${src}/$file $out/tex/latex/dTeX$(echo $file | grep -o '/.*')
done
'';
});
in stdenv.mkDerivation rec {
name = "TeX-env";
env = buildEnv {
inherit name;
paths = buildInputs;
};
buildInputs = [
pkgs.ncurses
(texlive.combine {
inherit dTeX;
inherit (texlive)
titlesec
l3build
;
})
];
}