-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
58 lines (56 loc) · 1.48 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
{
description = "Nixity";
inputs = {
devenv.url = "github:cachix/devenv";
nixities.url = "github:ereslibre/nixities";
systems.url = "github:nix-systems/default";
};
outputs = {
self,
devenv,
nixities,
systems,
...
} @ inputs: let
eachSystem = nixities.nixpkgs.lib.genAttrs (import systems);
in {
# Fix issue with devenv-up missing with flakes: https://github.com/cachix/devenv/issues/756
packages = eachSystem (system: {
devenv-up = self.devShells.${system}.default.config.procfileScript;
});
devShells = eachSystem (system: let
pkgs = import nixities.nixpkgs {inherit system;};
in {
# The default devShell
default = devenv.lib.mkShell {
inherit pkgs;
inputs.nixpkgs = nixities.nixpkgs;
modules = [
({pkgs, ...}: {
env = {
DOCKER_HOST = "unix:///var/run/docker.sock";
WASMTIME_NEW_CLI = "1";
TERM = "xterm";
};
languages = {
c.enable = true;
go.enable = true;
};
packages =
(with pkgs; [
alejandra
bat
fermyon-spin
just
wasm-tools
wasmtime
])
++ pkgs.lib.lists.optionals pkgs.stdenv.isx86_64 (with nixities.packages.${system}; [
wasi-sdk-20
]);
})
];
};
});
};
}