Skip to content

Commit 78027a6

Browse files
committed
refactor(shells): Migrate shells from nix-blockchain-development
1 parent 795766d commit 78027a6

File tree

9 files changed

+173
-0
lines changed

9 files changed

+173
-0
lines changed

shells/all.nix

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
pkgs,
3+
self',
4+
}:
5+
with pkgs;
6+
let
7+
example-container = nix2container.buildImage {
8+
name = "example";
9+
tag = "latest";
10+
config = {
11+
entrypoint = [
12+
"${pkgs.figlet}/bin/figlet"
13+
"MCL"
14+
];
15+
};
16+
};
17+
in
18+
mkShell {
19+
packages =
20+
[
21+
# For priting the direnv banner
22+
figlet
23+
24+
# For formatting Nix files
25+
alejandra
26+
27+
# Packages defined in this repo
28+
metacraft-labs.cosmos-theta-testnet
29+
metacraft-labs.bnb-beacon-node
30+
metacraft-labs.circom
31+
32+
metacraft-labs.circ
33+
34+
metacraft-labs.go-opera
35+
36+
metacraft-labs.polkadot
37+
metacraft-labs.polkadot-fast
38+
39+
# noir
40+
# self'.legacyPackages.noir.nargo
41+
# self'.legacyPackages.noir.noirc_abi_wasm
42+
# self'.legacyPackages.noir.acvm_js
43+
44+
# ethereum.nix
45+
self'.legacyPackages.ethereum_nix.geth
46+
47+
# avalanche cli
48+
metacraft-labs.avalanche-cli
49+
50+
# Node.js related
51+
metacraft-labs.corepack-shims
52+
]
53+
++ lib.optionals (stdenv.hostPlatform.isx86) [
54+
metacraft-labs.rapidsnark
55+
56+
# Cardano
57+
metacraft-labs.cardano
58+
]
59+
++ lib.optionals (stdenv.hostPlatform.isx86 && stdenv.isLinux) [
60+
# Rapidsnark depends on Pistache, which supports only Linux, see
61+
# https://github.com/pistacheio/pistache/issues/6#issuecomment-242398225
62+
# for more information
63+
metacraft-labs.rapidsnark-server
64+
65+
# Ethereum
66+
self'.legacyPackages.ethereum_nix.nimbus
67+
68+
# Test nix2container
69+
example-container.copyToDockerDaemon
70+
]
71+
++ lib.optionals (!stdenv.isDarwin) [
72+
# Solana is still not compatible with macOS on M1
73+
# metacraft-labs.solana
74+
metacraft-labs.wasmd
75+
76+
# Disabled until mx-chain-go can build with Go >= 1.19
77+
# Elrond
78+
# metacraft-labs.mx-chain-go
79+
# metacraft-labs.mx-chain-proxy-go
80+
81+
# EOS
82+
metacraft-labs.leap
83+
metacraft-labs.eos-vm
84+
metacraft-labs.cdt
85+
86+
# emscripten
87+
metacraft-labs.emscripten
88+
];
89+
90+
shellHook = ''
91+
figlet -w$COLUMNS "nix-blockchain-development"
92+
'';
93+
}

shells/ci.nix

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{ pkgs, config, ... }:
2+
pkgs.mkShellNoCC {
3+
packages = with pkgs; [
4+
jq
5+
nix-eval-jobs
6+
figlet
7+
];
8+
9+
shellHook =
10+
''
11+
figlet -w$COLUMNS "nix-blockchain-development"
12+
''
13+
+ config.pre-commit.installationScript;
14+
}

shells/default.nix

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
pkgs,
1212
inputs',
1313
config,
14+
final,
15+
self',
1416
...
1517
}:
1618
{
@@ -50,5 +52,20 @@
5052
''
5153
+ config.pre-commit.installationScript;
5254
};
55+
56+
devShells.all = import ./all.nix {
57+
pkgs = final;
58+
inherit self';
59+
};
60+
devShells.ci = import ./ci.nix {
61+
pkgs = final;
62+
inherit config;
63+
};
64+
devShells.nexus = import ./nexus.nix { pkgs = final; };
65+
devShells.jolt = import ./jolt.nix { pkgs = final; };
66+
devShells.zkm = import ./zkm.nix { pkgs = final; };
67+
devShells.zkwasm = import ./zkwasm.nix { pkgs = final; };
68+
devShells.sp1 = import ./sp1.nix { pkgs = final; };
69+
devShells.risc0 = import ./risc0.nix { pkgs = final; };
5370
};
5471
}

shells/jolt.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{ pkgs, ... }:
2+
with pkgs;
3+
mkShell {
4+
packages = [
5+
pkg-config
6+
openssl
7+
metacraft-labs.jolt
8+
];
9+
}

shells/nexus.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{ pkgs, ... }:
2+
with pkgs;
3+
mkShell {
4+
packages = [
5+
cmake
6+
pkg-config
7+
openssl
8+
metacraft-labs.nexus
9+
];
10+
}

shells/risc0.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{ pkgs, ... }:
2+
with pkgs;
3+
mkShell {
4+
packages = [
5+
metacraft-labs.risc0
6+
];
7+
}

shells/sp1.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{ pkgs, ... }:
2+
with pkgs;
3+
mkShell {
4+
packages = [
5+
metacraft-labs.sp1
6+
];
7+
}

shells/zkm.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{ pkgs, ... }:
2+
with pkgs;
3+
mkShell {
4+
packages = [
5+
pkg-config
6+
openssl
7+
metacraft-labs.zkm
8+
];
9+
}

shells/zkwasm.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{ pkgs, ... }:
2+
with pkgs;
3+
mkShell {
4+
packages = [
5+
metacraft-labs.zkwasm
6+
];
7+
}

0 commit comments

Comments
 (0)