Skip to content

Commit 8057eaf

Browse files
committed
Replace custom slither package with nixpkgs version
1 parent 25a45f9 commit 8057eaf

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
1. Create `packages/slither/default.nix` implementing a Nix expression using `python3Packages.buildPythonApplication`.
2+
3+
* Fetch the PyPI release `slither-analyzer` (e.g. version `0.11.3`).
4+
* Include propagated dependencies such as `packaging`, `prettytable`, `pycryptodome`, `crytic-compile`, `web3`, `eth-abi`, `eth-typing`, and `eth-utils`.
5+
* Set `mainProgram = "slither"` in `meta`.
6+
2. Register the package in `packages/all-packages.nix` inside `legacyPackages.metacraft-labs`.
7+
3. Optionally list the new package in `README.md` under a “Security and Static Analysis” section.
8+
9+
Make sure that the package works
10+
11+
--- FOLLOW UP TASK ---
12+
Since slither is available in nixpkgs, can we just take it from there?

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ via one of the flake output categories:
8383
| -------------------------- | ---------------------------------------------- | ------------------- |
8484
| [pistache]([pistache-url]) | A high-performance REST toolkit written in C++ | x86_64-linux |
8585

86+
### Security and Static Analysis
87+
88+
| package name | description | supported platforms |
89+
| ------------ | ----------- | ------------------- |
90+
| [slither]([slither-url]) | Static analysis framework for Solidity | x86_64-linux, x86_64-darwin |
91+
8692
[cosmos-url]: https://github.com/hyphacoop/testnets/blob/master/local/previous-local-testnets/v7-theta/priv_validator_key.json
8793
[emscripten-url]: https://github.com/emscripten-core/emscripten
8894
[avalanche-url]: https://github.com/ava-labs/avalanche-cli
@@ -112,6 +118,7 @@ via one of the flake output categories:
112118
[rapidsnark-url]: https://github.com/iden3/rapidsnark-old
113119
[wasmd-url]: https://github.com/CosmWasm/wasmd
114120
[polkadot-fast-url]: https://github.com/paritytech/polkadot/blob/52209dcfe546ff39cc031b92d64e787e7e8264d4/Cargo.toml#L228
121+
[slither-url]: https://github.com/crytic/slither
115122

116123
## Usage examples
117124

packages/all-packages.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
};
186186

187187
inherit corepack-shims;
188+
slither = pkgs.slither;
188189
}
189190
// lib.optionalAttrs hostPlatform.isLinux rec {
190191
kurtosis = callPackage ./kurtosis/default.nix { };

0 commit comments

Comments
 (0)