mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-28 02:40:50 +00:00
echidna: 2.2.3 -> 2.2.6
- move to by-name folder - fix: runtime depends on slither-analyzer through wrapProgram
This commit is contained in:
120
pkgs/by-name/ec/echidna/package.nix
Normal file
120
pkgs/by-name/ec/echidna/package.nix
Normal file
@@ -0,0 +1,120 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
makeWrapper,
|
||||
haskellPackages,
|
||||
fetchFromGitHub,
|
||||
# dependencies
|
||||
slither-analyzer,
|
||||
}:
|
||||
|
||||
haskellPackages.mkDerivation rec {
|
||||
pname = "echidna";
|
||||
version = "2.2.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "crytic";
|
||||
repo = "echidna";
|
||||
tag = "v${version}";
|
||||
sha256 = "sha256-5nzis7MXOqs0bhx2jrEexjZYZI2qY6D0D7AWO+SPs+A=";
|
||||
};
|
||||
|
||||
isExecutable = true;
|
||||
|
||||
buildTools = with haskellPackages; [
|
||||
hpack
|
||||
];
|
||||
|
||||
executableHaskellDepends = with haskellPackages; [
|
||||
# base dependencies
|
||||
aeson
|
||||
base
|
||||
containers
|
||||
directory
|
||||
hevm
|
||||
MonadRandom
|
||||
mtl
|
||||
text
|
||||
# library dependencies
|
||||
ansi-terminal
|
||||
async
|
||||
base16-bytestring
|
||||
binary
|
||||
brick
|
||||
bytestring
|
||||
data-bword
|
||||
data-dword
|
||||
deepseq
|
||||
exceptions
|
||||
extra
|
||||
filepath
|
||||
hashable
|
||||
html-conduit
|
||||
html-entities
|
||||
http-conduit
|
||||
ListLike
|
||||
optics
|
||||
optics-core
|
||||
process
|
||||
random
|
||||
rosezipper
|
||||
semver
|
||||
signal
|
||||
split
|
||||
strip-ansi-escape
|
||||
time
|
||||
unliftio
|
||||
utf8-string
|
||||
vector
|
||||
vty
|
||||
vty-crossplatform
|
||||
wai-extra
|
||||
warp
|
||||
word-wrap
|
||||
xml-conduit
|
||||
yaml
|
||||
# executable dependencies
|
||||
code-page
|
||||
filepath
|
||||
hashable
|
||||
optparse-applicative
|
||||
time
|
||||
with-utf8
|
||||
];
|
||||
|
||||
executableToolDepends = [
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
hpack
|
||||
'';
|
||||
|
||||
postInstall =
|
||||
with haskellPackages;
|
||||
# https://github.com/NixOS/nixpkgs/pull/304352
|
||||
lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) ''
|
||||
remove-references-to -t ${warp.out} "$out/bin/echidna"
|
||||
remove-references-to -t ${wreq.out} "$out/bin/echidna"
|
||||
''
|
||||
# make slither-analyzer a runtime dependency
|
||||
+ ''
|
||||
wrapProgram $out/bin/echidna \
|
||||
--prefix PATH : ${lib.makeBinPath [ slither-analyzer ]}
|
||||
'';
|
||||
|
||||
doHaddock = false;
|
||||
|
||||
# tests depend on a specific version of solc
|
||||
doCheck = false;
|
||||
|
||||
homepage = "https://github.com/crytic/echidna";
|
||||
description = "Ethereum smart contract fuzzer";
|
||||
license = lib.licenses.agpl3Plus;
|
||||
maintainers = with lib.maintainers; [
|
||||
arturcygan
|
||||
hellwolf
|
||||
];
|
||||
platforms = lib.platforms.unix;
|
||||
mainProgram = "echidna";
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchpatch,
|
||||
mkDerivation,
|
||||
fetchFromGitHub,
|
||||
haskellPackages,
|
||||
slither-analyzer,
|
||||
}:
|
||||
|
||||
mkDerivation (
|
||||
rec {
|
||||
pname = "echidna";
|
||||
version = "2.2.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "crytic";
|
||||
repo = "echidna";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-NJ2G6EkexYE4P3GD7PZ+lLEs1dqnoqIB2zfAOD5SQ8M=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Support cross platform vty 6.x with vty-crossplatform
|
||||
# https://github.com/crytic/echidna/pull/1290
|
||||
(fetchpatch {
|
||||
url = "https://github.com/crytic/echidna/commit/2913b027d7e793390ed489ef6a47d23ec9b3c800.patch";
|
||||
hash = "sha256-5CGD9nDbDUTG869xUybWYSvGRsrm7JP7n0WMBNYfayw=";
|
||||
})
|
||||
];
|
||||
|
||||
isExecutable = true;
|
||||
|
||||
libraryToolDepends = with haskellPackages; [ haskellPackages.hpack ];
|
||||
|
||||
executableHaskellDepends = with haskellPackages; [
|
||||
# package.yaml - dependencies
|
||||
base
|
||||
aeson
|
||||
async
|
||||
base16-bytestring
|
||||
binary
|
||||
bytestring
|
||||
code-page
|
||||
containers
|
||||
data-bword
|
||||
data-dword
|
||||
deepseq
|
||||
extra
|
||||
directory
|
||||
exceptions
|
||||
filepath
|
||||
hashable
|
||||
hevm
|
||||
html-entities
|
||||
ListLike
|
||||
MonadRandom
|
||||
mtl
|
||||
optparse-applicative
|
||||
optics
|
||||
optics-core
|
||||
process
|
||||
random
|
||||
rosezipper
|
||||
semver
|
||||
split
|
||||
text
|
||||
transformers
|
||||
time
|
||||
unliftio
|
||||
utf8-string
|
||||
vector
|
||||
with-utf8
|
||||
word-wrap
|
||||
yaml
|
||||
http-conduit
|
||||
html-conduit
|
||||
warp
|
||||
wai-extra
|
||||
xml-conduit
|
||||
strip-ansi-escape
|
||||
# package.yaml - dependencies when "!os(windows)"
|
||||
brick
|
||||
unix
|
||||
vty
|
||||
];
|
||||
|
||||
# Note: there is also a runtime dependency of slither-analyzer. So, let's include it.
|
||||
executableSystemDepends = [ slither-analyzer ];
|
||||
|
||||
preConfigure = ''
|
||||
hpack
|
||||
'';
|
||||
|
||||
shellHook = "hpack";
|
||||
|
||||
doHaddock = false;
|
||||
|
||||
# tests depend on a specific version of solc
|
||||
doCheck = false;
|
||||
|
||||
description = "Ethereum smart contract fuzzer";
|
||||
homepage = "https://github.com/crytic/echidna";
|
||||
license = lib.licenses.agpl3Plus;
|
||||
maintainers = with lib.maintainers; [
|
||||
arturcygan
|
||||
hellwolf
|
||||
];
|
||||
platforms = lib.platforms.unix;
|
||||
mainProgram = "echidna-test";
|
||||
|
||||
}
|
||||
// lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) {
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/pull/304352
|
||||
postInstall = with haskellPackages; ''
|
||||
remove-references-to -t ${warp.out} "$out/bin/echidna"
|
||||
remove-references-to -t ${wreq.out} "$out/bin/echidna"
|
||||
'';
|
||||
}
|
||||
)
|
||||
@@ -1759,8 +1759,6 @@ with pkgs;
|
||||
|
||||
dkimpy = with python3Packages; toPythonApplication dkimpy;
|
||||
|
||||
echidna = haskell.lib.compose.justStaticExecutables (haskellPackages.callPackage ../tools/security/echidna { });
|
||||
|
||||
esbuild = callPackage ../development/tools/esbuild { };
|
||||
|
||||
esbuild_netlify = callPackage ../development/tools/esbuild/netlify.nix { };
|
||||
|
||||
Reference in New Issue
Block a user