-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
95 lines (80 loc) · 1.79 KB
/
default.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
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
let
fetchTarballFromGitHub =
{ owner, repo, rev, sha256, ... }:
builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/tarball/${rev}";
inherit sha256;
};
fromJSONFile = f: builtins.fromJSON (builtins.readFile f);
in
{ nixpkgs ? fetchTarballFromGitHub (fromJSONFile ./nixpkgs-src.json) }:
with import nixpkgs {
overlays = [
(self: super: {
xelatex = super.texlive.combine {
inherit (super.texlive) scheme-small
braket
datatool
ebproof
glossaries
hardwrap
latexmk
# mathpazo
mfirstuc
# microtype
# palatino
substr
titlesec
tkz-base
tkz-berge
tkz-graph
todonotes
tufte-latex
xetex
xindy
xfor;
};
})
];
};
let
my-ghc = haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [
algebraic-graphs
# algebraic-graphs_0_3
# containers
# hgal
]);
in
{
drv = stdenv.mkDerivation rec {
name = "intro-to-graph-theory-${version}";
version = "0.2.7.0";
src = ./.;
buildInputs = [
xelatex
];
installPhase = ''
install -Dm755 src/exercises.pdf "$out/exercises.pdf"
'';
meta = with stdenv.lib; {
description = "Into to Graph Theory";
longDescription = ''
Working through exercises in "Introduction to Graph Theory"
by Richard J. Trudeau.
'';
homepage = https://github.com/yurrriq/intro-to-graph-theory;
license = licenses.unlicense;
maintainers = with maintainers; [ yurrriq ];
platforms = platforms.all;
};
};
shell = mkShell {
buildInputs = [
gnumake
hlint
my-ghc
qpdfview
xelatex
];
};
}