summary refs log tree commit diff
path: root/pkgs/tools/security/echidna/default.nix
blob: fcd94f66fbc59320d561e5d9b5e1f483e2f3849d (plain) (blame)
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
{ lib
, fetchFromGitHub
# Haskell deps
, mkDerivation, aeson, base, base16-bytestring, binary, brick, bytestring
, containers, data-dword, data-has, directory, exceptions, extra, filepath
, hashable, hevm, hpack, html-entities, lens, ListLike, MonadRandom, mtl
, optparse-applicative, process, random, semver, tasty, tasty-hunit
, tasty-quickcheck, text, transformers, unix, unliftio, unordered-containers
, vector, vector-instances, vty, yaml
}:
mkDerivation rec {
  pname = "echidna";
  version = "2.0.5";

  src = fetchFromGitHub {
    owner = "crytic";
    repo = "echidna";
    rev = "v${version}";
    sha256 = "sha256-8bChe+qA4DowfuwsR5wLckb56fXi102g8vL2gAH/kYE=";
  };

  isLibrary = true;
  isExecutable = true;
  libraryHaskellDepends = [
    aeson base base16-bytestring binary brick bytestring containers data-dword
    data-has directory exceptions extra filepath hashable hevm html-entities
    lens ListLike MonadRandom mtl optparse-applicative process random semver
    text transformers unix unliftio unordered-containers vector vector-instances
    vty yaml
  ];
  libraryToolDepends = [ hpack ];
  executableHaskellDepends = libraryHaskellDepends;
  testHaskellDepends = [
    tasty tasty-hunit tasty-quickcheck
  ];
  preConfigure = ''
    hpack
    # re-enable dynamic build for Linux
    sed -i -e 's/os(linux)/false/' echidna.cabal
  '';
  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 ];
  platforms = lib.platforms.unix;
  mainProgram = "echidna-test";
}