-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathflake.nix
More file actions
124 lines (105 loc) · 3.88 KB
/
flake.nix
File metadata and controls
124 lines (105 loc) · 3.88 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
{
description = "Haskell Optimization Handbook flake";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, flake-compat }:
let pythonEnv-overlay = final: prev: {
python313Packages = prev.python313Packages.overrideScope (pyFinal: pyPrev: {
# sphinx-press-theme = pyPrev.buildPythonPackage rec {
# pname = "sphinx-press-theme";
# pyproject = true;
# build-system = [ pyPrev.setuptools ];
# version = "0.9.1";
# src = pyPrev.fetchPypi {
# inherit pname;
# inherit version;
# sha256 = "sha256-KITKqx3AHssR0VjU3W0xeeLdl81IUWx2nMJzYCcuYrM=";
# };
# propagatedBuildInputs = [ pyPrev.sphinx ];
# };
sphinx-copybutton = pyPrev.buildPythonPackage rec {
pname = "sphinx-copybutton";
pyproject = true;
build-system = [ pyPrev.setuptools ];
version = "0.5.2";
src = pyPrev.fetchPypi {
inherit pname;
inherit version;
sha256 = "sha256-TPF8gvuWRtG8nKkqwoCBOjtgXYxCEiX9mRMVQQPuH70=";
};
propagatedBuildInputs = [ pyPrev.sphinx ];
};
sphinx-exec-directive = pyPrev.buildPythonPackage rec {
pname = "sphinx-exec-directive";
pyproject = true;
build-system = [ pyPrev.setuptools ];
version = "0.6";
src = pyPrev.fetchPypi {
inherit pname;
inherit version;
sha256 = "sha256-lMo4QILqt6pEiIatN/LNxhiUGX3ziSWV+bfRahzmZWU=";
};
propagatedBuildInputs = [ pyPrev.sphinx
pyPrev.matplotlib
];
};
sphinxcontrib-bibtex = pyPrev.buildPythonPackage rec {
pname = "sphinxcontrib_bibtex"; # yes they are inconsistent with the name
pyproject = true;
build-system = [ pyPrev.setuptools ];
version = "2.6.5";
src = pyPrev.fetchPypi {
inherit pname;
inherit version;
sha256 = "sha256-mzIk3W/s6SaOvYyQXcCoP/L2xUFIqSNf5w6dHp/xScA=";
};
propagatedBuildInputs = [ pyPrev.sphinx
pyPrev.pybtex
pyPrev.pybtex-docutils
];
};
});
};
tex-overlay = final: prev: {
tex-env = prev.texlive.combine {
inherit (prev.texlive)
scheme-basic collection-xetex fncychap titlesec tabulary varwidth
framed capt-of wrapfig needspace dejavu-otf helvetic upquote
memorygraphs;
};
};
in
flake-utils.lib.eachDefaultSystem
(system:
let pkgs = import nixpkgs
{ inherit system;
overlays = [ pythonEnv-overlay
tex-overlay
];
} ;
## TODO use this
fonts = pkgs.makeFontsConf { fontDirectories = [ pkgs.dejavu_fonts ]; };
in
rec {
packages = {
default = import ./hoh.nix { inherit pkgs;
target = "html";
};
epub = import ./hoh.nix { inherit pkgs;
target = "epub";
};
pdf = import ./hoh.nix { inherit pkgs;
target = "pdf";
};
};
devShells = {
default = packages.default;
};
}
);
}