-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
108 lines (94 loc) · 2.59 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# SPDX-FileCopyrightText: 2024 Mini-Python Builder Contributors
#
# SPDX-License-Identifier: CC0-1.0
#
# Development environment configuration © 2024 by Mini-Python Builder Contributors
# is marked with CC0 1.0
{
inputs.flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
# update this url to github:nixos/nixpkgs/nixos-unstable
inputs.nixpkgs.url = "github:liketechnik/nixpkgs/init/mdbook-pandoc";
outputs = {
self,
nixpkgs,
...
} @ inputs: let
forSystems = function:
nixpkgs.lib.genAttrs [
"x86_64-linux"
] (system: let
pkgs = import nixpkgs {
inherit system;
};
in
function {inherit system pkgs;});
in {
formatter = forSystems ({pkgs, ...}: pkgs.alejandra);
devShells = forSystems ({
pkgs,
system,
...
}: let
defaultShell = {
packages = with pkgs; [
bashInteractive # the default bash supplied by mkShell
# does not support interactive use
gnumake
reuse
eclint
mdbook
plantuml
# compilation of the c-runtime to wasm (linker, etc)
pkgs.pkgsCross.wasi32.stdenv.cc.bintools
# web-assembly binary toolkit; i.e. inspecting wasm files & co
wabt
# webassembly runtime
wasmtime
# compilation database for c language server for c-runtime dev
bear
# builder/c-runtime tests
gcc
clang
clang-tools
valgrind
# c-runtime docs
doxygen
];
JAVA_HOME = pkgs.openjdk_headless.home;
# compilation of the c-runtime to wasm (compiler)
CC_WASM="${pkgs.pkgsCross.wasi32.stdenv.cc}/bin/${pkgs.pkgsCross.wasi32.stdenv.cc.targetPrefix}cc";
MPY_BUILDER_WASM_USE_SYSTEM_WASMTIME = 1;
shellHook = ''
unset SOURCE_DATE_EPOCH
echo "make <task>:"
make list
'';
};
in {
default = pkgs.mkShell defaultShell;
with-texlive = pkgs.mkShell (defaultShell
// {
packages =
defaultShell.packages
++ (with pkgs; [
librsvg
mdbook-pandoc
texlive.combined.scheme-full
]);
FONTCONFIG_FILE = pkgs.makeFontsConf {
fontDirectories = with pkgs; [
# serif, math
stix-two
# sans-serif/mono
recursive
# emoji
noto-fonts-emoji
];
};
});
});
};
}