-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
74 lines (70 loc) · 1.96 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
66
67
68
69
70
71
72
73
74
{
description = "Nix repo for calculator programs";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
nixConfig = {
# Adapted From: https://github.com/divnix/digga/blob/main/examples/devos/flake.nix#L4
extra-substituters = "https://cache.nixos.org https://ce-programs.cachix.org";
extra-trusted-public-keys = "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ce-programs.cachix.org-1:ZwW4booZjjGMYrr2uic5LFAo+TpMybhcfI/WrmKohiw=";
};
outputs =
{
nixpkgs,
self,
flake-utils,
}@inputs:
flake-utils.lib.eachSystem
[
"x86_64-linux"
"x86_64-darwin"
]
(
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
formatter = pkgs.nixfmt-rfc-style;
legacyPackages = import ./pkgs { nixpkgs = pkgs; };
checks.default = pkgs.linkFarm "all-nix-calculators" (
(map (name: {
inherit name;
path = legacyPackages.CEPrograms.${name};
}) (builtins.attrNames legacyPackages.CEPrograms))
++ (map
(name: {
inherit name;
path = legacyPackages.${name};
})
[
"convbin"
"convfont"
"convimg"
"llvm-ez80"
"ce-toolchain"
"ce-toolchain-stable"
"ce-libs"
"ce-libs-stable"
"tivars"
"puzpy"
"gcc4ti"
]
)
);
}
)
// {
templates = {
hello-world = {
path = ./templates/hello-world;
description = "A simple Hello World program";
};
default = {
path = ./templates/bare-bones;
description = "Add flakes to an existing program";
};
};
};
}