-
-
Notifications
You must be signed in to change notification settings - Fork 131
/
flake.nix
43 lines (42 loc) · 1.24 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
{
description = "An Infinitely Large Napkin";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
with flake-utils.lib;
eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
tex = (pkgs.texlive.combine {
inherit (pkgs.texlive)
scheme-medium
asymptote wrapfig amsmath ulem hyperref capt-of
latexmk biber xpatch
tkz-graph tikz-cd xcolor todonotes
mdframed mathtools braket
multirow prerex cleveref
wasysym stmaryrd
microtype relsize
answers etoolbox minitoc thmtools zref needspace
biblatex xypic;
});
in {
formatter = nixpkgs.legacyPackages."${system}".nixfmt;
defaultPackage = pkgs.stdenv.mkDerivation {
name = "napkin";
version = "1.5";
src = ./.;
buildInputs = with pkgs; [tex ghostscript asymptote biber];
buildPhase = ''
mkdir asy
latexmk -f
'';
installPhase = ''
mkdir -p $out
cp Napkin.pdf $out/
'';
};
});
}