-
Notifications
You must be signed in to change notification settings - Fork 25
/
flake.nix
46 lines (40 loc) · 1.16 KB
/
flake.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
{
description = "Mathematical Components (the book)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, nixpkgs, utils, ... }:
utils.lib.eachDefaultSystem (system:
with import nixpkgs { inherit system; }; {
defaultPackage = stdenv.mkDerivation {
name = "math-comp-book";
version = "master";
src = ./.;
nativeBuildInputs = [ git texlive.combined.scheme-full ];
buildPhase = ''
cd tex
make
biber main
make
make
'';
installPhase = ''
mkdir -p $out/share
cp book.pdf $out/share
'';
meta = with lib; {
description = "Mathematical components book";
homepage = "https://github.com/math-comp/mcb";
license = lib.licenses.cc-by-nc-40;
maintainers = with maintainers; [ siraben ];
platforms = platforms.all;
};
};
}
);
}