-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
65 lines (61 loc) · 2.13 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
inputs = {
context.flake = false;
context.url = "github:contextgarden/context";
context-fonts.flake = false;
context-fonts.url = "github:contextgarden/context-distribution-fonts";
context-modules.flake = false;
context-modules.url = "github:usertam/context-minimals/mirror/modules";
luatex.flake = false;
luatex.url = "github:TeX-Live/luatex";
nixpkgs.url = "flake:nixpkgs/nixpkgs-unstable";
systems.flake = false;
systems.url = "flake:systems";
};
nixConfig.extra-substituters = "https://context-minimals.cachix.org";
nixConfig.extra-trusted-public-keys = "context-minimals.cachix.org-1:pYxyH24J/A04fznRlYbTTjWrn9EsfUQvccGMjfXMdj0=";
outputs = { self, ... }@inputs:
let
forAllSystems = nixpkgs-lib.attrsets.genAttrs systems;
nixpkgs-lib = inputs.nixpkgs.lib;
systems = import inputs.systems;
in {
packages = forAllSystems (system:
let
packages' = self.packages.${system};
pkgs = inputs.nixpkgs.legacyPackages.${system};
in {
luametatex = pkgs.callPackage ./pkgs/luametatex {
src = inputs.context + /source/luametatex;
};
luatex = pkgs.callPackage ./pkgs/luatex {
src = inputs.luatex;
};
context-minimals = pkgs.callPackage ./pkgs/context-minimals {
inherit (inputs) context context-fonts context-modules;
inherit (packages') luametatex luatex;
};
default = packages'.context-minimals;
});
apps = forAllSystems (system:
let
apps' = self.apps.${system};
mkApp = bin: {
type = "app";
program = "${packages'.default}/bin/${bin}";
};
packages' = self.packages.${system};
in {
context = mkApp "context";
luametatex = mkApp "luametatex";
luatex = mkApp "luatex";
mtxrun = mkApp "mtxrun";
default = apps'.context;
});
lib = import ./modules/lib {
inherit (inputs) nixpkgs;
inherit forAllSystems nixpkgs-lib;
contextPackages = self.packages;
};
};
}