-
Notifications
You must be signed in to change notification settings - Fork 15
/
flake.nix
56 lines (50 loc) · 1.57 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
{
description = "euphonium - Tiny audio platform";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
gk-flasher = {
url = "github:muvox-io/gk-flasher";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, gk-flasher }:
let
overlay = final: prev: {
euphonium = (final.callPackage ./nix { });
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
gk-flasher = gk-flasher.packages.${prev.system}.default;
};
in {
overlays.default = overlay;
} // flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ overlay ];
};
apps = {
flash-storage = {
type = "app";
program = "${pkgs.euphonium.flash-storage}/bin/flash-storage";
};
};
packages = {
frontend = pkgs.euphonium.frontend;
fs-esp32 = pkgs.euphonium.fs-esp32;
app-esp32 = (pkgs.euphonium.app-esp32 {
appVersion = self.rev or self.dirtyRev or "dirty";
});
euphoniumcli = pkgs.euphonium.euphoniumcli;
};
devShells = {
esp32 = pkgs.euphonium.shell-esp32;
frontend = pkgs.euphonium.shell-frontend;
};
in {
inherit apps devShells packages;
checks = packages;
devShell = devShells.esp32;
});
}