Skip to content

Commit 1ccba1d

Browse files
committed
feat(pkgs/cargo-stylus): Implement package for cargo-stylus v0.5.8
1 parent feeaa87 commit 1ccba1d

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
devShells.zkwasm = import ./shells/zkwasm.nix { pkgs = final; };
7676
devShells.sp1 = import ./shells/sp1.nix { pkgs = final; };
7777
devShells.risc0 = import ./shells/risc0.nix { pkgs = final; };
78+
devShells.stylus = import ./shells/stylus.nix { pkgs = final; };
7879
};
7980
};
8081
}

packages/all-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
cardano = callPackage ./cardano/default.nix { inherit cardano-cli cardano-node graphql; };
122122

123123
foundry = callPackage ./foundry/default.nix { inherit unstable-pkgs; };
124+
cargo-stylus = callPackage ./cargo-stylus/default.nix { inherit unstable-pkgs; };
124125

125126
polkadot-generic = callPackage ./polkadot/default.nix {
126127
craneLib = craneLib-stable;
@@ -194,6 +195,7 @@
194195
rec {
195196

196197
inherit foundry;
198+
inherit cargo-stylus;
197199

198200
gaiad = callPackage ./gaiad { };
199201
cosmos-theta-testnet = callPackage ./cosmos-theta-testnet { inherit gaiad; };

packages/cargo-stylus/default.nix

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
unstable-pkgs,
3+
...
4+
}:
5+
with unstable-pkgs;
6+
rustPlatform.buildRustPackage rec {
7+
pname = "cargo-stylus";
8+
version = "0.5.8";
9+
10+
src = fetchFromGitHub {
11+
owner = "OffchainLabs";
12+
repo = pname;
13+
rev = "v${version}";
14+
hash = "sha256-+wHGGzd4GWWmHnxset90s9FAzOjF7VMr58HZHUB+OwQ=";
15+
};
16+
17+
cargoLock = {
18+
lockFile = "${src}/Cargo.lock";
19+
};
20+
21+
buildInputs = [
22+
cargo
23+
openssl
24+
];
25+
26+
nativeBuildInputs = [
27+
pkg-config
28+
];
29+
30+
meta = {
31+
description = "Cargo subcommand for developing Arbitrum Stylus projects in Rust.";
32+
homepage = "https://github.com/OffchainLabs/cargo-stylus";
33+
license = [
34+
lib.licenses.mit
35+
lib.licenses.asl20
36+
];
37+
};
38+
}

shells/stylus.nix

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

0 commit comments

Comments
 (0)