-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathflake.nix
56 lines (53 loc) · 1.37 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
{
inputs = {
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nci = {
url = "github:yusdacra/nix-cargo-integration";
inputs = {
nixpkgs.follows = "nixpkgs";
parts.follows = "parts";
};
};
parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
};
outputs = inputs@{ parts, nci, ... }:
parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
imports = [
parts.flakeModules.easyOverlay
nci.flakeModule
./crates.nix
];
perSystem = { config, ... }:
let
anteCrate = config.nci.outputs.ante;
ante-lsCrate = config.nci.outputs.ante-ls;
in
{
overlayAttrs = {
inherit (config.packages)
ante
ante-ls;
};
packages = rec {
default = ante;
ante = anteCrate.packages.release;
ante-ls = ante-lsCrate.packages.release;
};
devShells.default = anteCrate.devShell.overrideAttrs (_: {
shellHook = ''
PATH=$PATH:$PWD/target/debug
'';
});
};
};
}