forked from cubewhy/rust-asm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
97 lines (83 loc) · 2.41 KB
/
flake.nix
File metadata and controls
97 lines (83 loc) · 2.41 KB
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
# vim:fileencoding=utf-8:foldmethod=marker
#: Tip: If you are using (n)vim, you can press zM to fold all the config blocks quickly (za to fold under cursor)
#: Tip: search keywords to start quickly
{
#: Inputs {{{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
blackbox.url = "github:cubewhy/blackbox-flakes";
#: Do not forget to modify the `overlays` variable below after you added new overlays
rust-overlay.url = "github:oxalica/rust-overlay";
};
#: inputs end }}}
outputs = {
self,
blackbox,
rust-overlay,
# go-overlay,
nixpkgs,
...
}: let
#: Overlays {{{
overlays = [
(import rust-overlay)
# (import go-overlay)
];
#: overlays end }}}
in {
devShells =
blackbox.lib.eachSystem {
inherit nixpkgs overlays;
} (pkgs: {
default = blackbox.lib.mkShell {
inherit pkgs;
#: Config {{{
config = {
#: Note: change the options there
#: You can delete unused options
#: Languages {{{
#: Rust {{{
blackbox.languages.rust = {
enable = true;
toolchainFile = ./rust-toolchain.toml;
};
#: rust end }}}
#: languages end }}}
#: Libraries {{{
blackbox.libraries = {
#: OpenSSL {{{
openssl.enable = false;
#: openssl end }}}
#: shared libraries {{{
#: blackbox-flake will config LD_LIBRARY_PATH and LIBRARY_PATH for the following packages
shared = with pkgs; [
# alsa-lib
# pipewire
# libpulseaudio
];
#: }}}
};
#: libraries end }}}
#: Tools {{{
blackbox.tools = {
#: Pre-commit {{{
pre-commit = {
enable = false;
#: Force run `pre-commit install` when enter shell
#: This is not recommended, please don't enable it.
runOnStart = false;
};
#: pre-commit end }}}
};
#: tools end }}}
};
#: config end }}}
#: Custom options {{{
#: mkShell builtin options are available
# shellHook = ''
# '';
#: custom options end }}}
};
});
};
}