-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
82 lines (75 loc) · 2 KB
/
flake.nix
File metadata and controls
82 lines (75 loc) · 2 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
description = "Blocksense Dev Shells";
nixConfig = {
extra-substituters = [
"https://blocksense.cachix.org"
"https://mcl-blockchain-packages.cachix.org"
"https://mcl-public-cache.cachix.org"
];
extra-trusted-public-keys = [
"blocksense.cachix.org-1:BGg+LtKwTRIBw3BxCWEV//IO7v6+5CiJVSGzBOQUY/4="
"mcl-blockchain-packages.cachix.org-1:qoEiUyBgNXmgJTThjbjO//XA9/6tCmx/OohHHt9hWVY="
"mcl-public-cache.cachix.org-1:OcUzMeoSAwNEd3YCaEbNjLV5/Gd+U5VFxdN2WGHfpCI="
];
};
inputs = {
nixos-modules.url = "github:metacraft-labs/nixos-modules";
nixpkgs.follows = "nixos-modules/nixpkgs";
flake-parts.follows = "nixos-modules/flake-parts";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-darwin"
];
perSystem =
{
lib,
pkgs,
inputs',
...
}:
let
mcl-pkgs = inputs'.mcl-blockchain.legacyPackages;
commonPkgs =
with pkgs;
[
pkg-config
curl
libusb1
openssl
zstd
]
++ lib.optionals pkgs.stdenv.isLinux [
udev
]
++ lib.optionals stdenv.isDarwin [
iconv
];
rustPkgs = commonPkgs ++ [
mcl-pkgs.rust-latest
];
nodejsPkgs =
let
nodejs = pkgs.nodejs_24;
corepack = pkgs.corepack.override { inherit nodejs; };
in
commonPkgs
++ [
nodejs
corepack
pkgs.python3
];
mkShell = pkgSet: pkgs.mkShell { packages = pkgSet; };
in
{
devShells = {
default = mkShell (rustPkgs ++ nodejsPkgs);
rust = mkShell rustPkgs;
nodejs = mkShell nodejsPkgs;
};
};
};
}