vuze: drop (#358309)
[NixPkgs.git] / pkgs / tools / security / echidna / default.nix
blobf3bfb9fbffeec154b94540efd9a7fa370744da91
2   stdenv,
3   lib,
4   fetchpatch,
5   mkDerivation,
6   fetchFromGitHub,
7   haskellPackages,
8   slither-analyzer,
9 }:
11 mkDerivation (
12   rec {
13     pname = "echidna";
14     version = "2.2.3";
16     src = fetchFromGitHub {
17       owner = "crytic";
18       repo = "echidna";
19       rev = "v${version}";
20       sha256 = "sha256-NJ2G6EkexYE4P3GD7PZ+lLEs1dqnoqIB2zfAOD5SQ8M=";
21     };
23     patches = [
24       # Support cross platform vty 6.x with vty-crossplatform
25       # https://github.com/crytic/echidna/pull/1290
26       (fetchpatch {
27         url = "https://github.com/crytic/echidna/commit/2913b027d7e793390ed489ef6a47d23ec9b3c800.patch";
28         hash = "sha256-5CGD9nDbDUTG869xUybWYSvGRsrm7JP7n0WMBNYfayw=";
29       })
30     ];
32     isExecutable = true;
34     libraryToolDepends = with haskellPackages; [ haskellPackages.hpack ];
36     executableHaskellDepends = with haskellPackages; [
37       # package.yaml - dependencies
38       base
39       aeson
40       async
41       base16-bytestring
42       binary
43       bytestring
44       code-page
45       containers
46       data-bword
47       data-dword
48       deepseq
49       extra
50       directory
51       exceptions
52       filepath
53       hashable
54       hevm
55       html-entities
56       ListLike
57       MonadRandom
58       mtl
59       optparse-applicative
60       optics
61       optics-core
62       process
63       random
64       rosezipper
65       semver
66       split
67       text
68       transformers
69       time
70       unliftio
71       utf8-string
72       vector
73       with-utf8
74       word-wrap
75       yaml
76       http-conduit
77       html-conduit
78       warp
79       wai-extra
80       xml-conduit
81       strip-ansi-escape
82       # package.yaml - dependencies when "!os(windows)"
83       brick
84       unix
85       vty
86     ];
88     # Note: there is also a runtime dependency of slither-analyzer. So, let's include it.
89     executableSystemDepends = [ slither-analyzer ];
91     preConfigure = ''
92       hpack
93     '';
95     shellHook = "hpack";
97     doHaddock = false;
99     # tests depend on a specific version of solc
100     doCheck = false;
102     description = "Ethereum smart contract fuzzer";
103     homepage = "https://github.com/crytic/echidna";
104     license = lib.licenses.agpl3Plus;
105     maintainers = with lib.maintainers; [
106       arturcygan
107       hellwolf
108     ];
109     platforms = lib.platforms.unix;
110     mainProgram = "echidna-test";
112   }
113   // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) {
115     # https://github.com/NixOS/nixpkgs/pull/304352
116     postInstall = with haskellPackages; ''
117       remove-references-to -t ${warp.out} "$out/bin/echidna"
118       remove-references-to -t ${wreq.out} "$out/bin/echidna"
119     '';
120   }