-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathflake.nix
63 lines (59 loc) · 1.73 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
zls-overlay.url = "github:zigtools/zls/edd8f2264ea45f7370bac4aba809bc179d96627e";
esp-idf.url = "github:mirrexagon/nixpkgs-esp-dev";
};
outputs =
{ self
, nixpkgs
, flake-utils
, zls-overlay
, esp-idf
,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
esp-idf.overlays.default
(final: prev: {
zls = zls-overlay.packages.${system}.default;
zig = pkgs.stdenv.mkDerivation {
pname = "zig-espressif-bootstrap";
version = "0.14.0-xtensa-dev";
src = pkgs.fetchurl {
url = "https://github.com/kassane/zig-espressif-bootstrap/releases/download/0.14.0-xtensa-dev/zig-relsafe-espressif-x86_64-linux-musl-baseline.tar.xz";
sha256 = "sha256-rZRlawDcRfsJinzz3ANpa/AW2nZ5Hu4yss3VAANchak=";
};
dontConfigure = true;
dontBuild = true;
dontFixup = true;
installPhase = ''
mkdir -p $out/{doc,bin,lib}
cp -r doc/* $out/doc
cp -r lib/* $out/lib
cp zig $out/bin/zig
'';
};
})
];
};
in
with pkgs;
{
formatter = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
devShells.default = mkShell {
buildInputs = [
bashInteractive
zig
zls
esp-idf-full
];
};
}
);
}