-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
63 lines (57 loc) · 1.68 KB
/
Copy pathflake.nix
File metadata and controls
63 lines (57 loc) · 1.68 KB
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
{
description = "Blocksense Network Monorepo";
nixConfig = {
extra-substituters = [
"https://cache.metacraft-labs.com/blocksense-public"
"https://cache.metacraft-labs.com/metacraft-public"
];
extra-trusted-public-keys = [
"blocksense-public:OOgTc0ye1FONCiVHMrbpScc/HP+lX3uoU0EfwzX6ypE="
"metacraft-public:UtS6PK+p0uZaJK3i/jD2DQOjTpddhQUQmNQDQih5N4Q="
];
};
inputs = {
mcl-blockchain.url = "github:metacraft-labs/nix-blockchain-development";
nixpkgs.follows = "mcl-blockchain/nixpkgs";
crane.follows = "mcl-blockchain/crane";
mcl-nixos-modules.follows = "mcl-blockchain/nixos-modules";
flake-parts.follows = "mcl-blockchain/flake-parts";
fenix.follows = "mcl-blockchain/fenix";
};
outputs =
inputs@{ flake-parts, crane, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-darwin"
];
perSystem =
{ pkgs, inputs', ... }:
let
rustToolchain =
with inputs'.fenix.packages;
with latest;
combine [
cargo
clippy
rust-analyzer
rust-src
rustc
rustfmt
targets.wasm32-wasip1.latest.rust-std
];
craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain;
in
{
devShells.default = pkgs.mkShell {
packages = [
rustToolchain
inputs'.mcl-nixos-modules.checks.foundry
];
};
packages.default = craneLib.buildPackage {
src = craneLib.cleanCargoSource ./.;
};
};
};
}