-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
41 lines (35 loc) · 1.15 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
{
description = "Flake for icy_matrix, a Matrix client written in Rust";
inputs = rec {
naersk = {
url = "github:yusdacra/naersk/extract-rev-cargolock";
inputs.nixpkgs = nixpkgs;
};
flakeUtils.url = "github:numtide/flake-utils";
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
nixpkgsMoz = {
url = "github:mozilla/nixpkgs-mozilla";
flake = false;
};
};
outputs = inputs: with inputs; with flakeUtils.lib;
eachSystem [ "x86_64-linux" ] (system:
let
common = import ./nix/common.nix {
sources = { inherit naersk nixpkgs nixpkgsMoz; };
inherit system;
};
packages = {
icy_matrix = import ./nix/build.nix { inherit common; release = true; };
icy_matrix-debug = import ./nix/build.nix { inherit common; };
};
apps = builtins.mapAttrs (n: v: mkApp { name = n; drv = v; exePath = "/bin/icy_matrix"; }) packages;
in
{
inherit packages apps;
defaultPackage = packages.icy_matrix-debug;
defaultApp = apps.icy_matrix-debug;
devShell = import ./nix/devShell.nix { inherit common; };
}
);
}