nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 120 lines 2.2 kB view raw
1{ 2 lib, 3 stdenv, 4 makeWrapper, 5 haskellPackages, 6 fetchFromGitHub, 7 # dependencies 8 slither-analyzer, 9}: 10 11haskellPackages.mkDerivation rec { 12 pname = "echidna"; 13 version = "2.2.6"; 14 15 src = fetchFromGitHub { 16 owner = "crytic"; 17 repo = "echidna"; 18 tag = "v${version}"; 19 sha256 = "sha256-5nzis7MXOqs0bhx2jrEexjZYZI2qY6D0D7AWO+SPs+A="; 20 }; 21 22 isExecutable = true; 23 24 buildTools = with haskellPackages; [ 25 hpack 26 ]; 27 28 executableHaskellDepends = with haskellPackages; [ 29 # base dependencies 30 aeson 31 base 32 containers 33 directory 34 hevm 35 MonadRandom 36 mtl 37 text 38 # library dependencies 39 ansi-terminal 40 async 41 base16-bytestring 42 binary 43 brick 44 bytestring 45 data-bword 46 data-dword 47 deepseq 48 exceptions 49 extra 50 filepath 51 hashable 52 html-conduit 53 html-entities 54 http-conduit 55 ListLike 56 optics 57 optics-core 58 process 59 random 60 rosezipper 61 semver 62 signal 63 split 64 strip-ansi-escape 65 time 66 unliftio 67 utf8-string 68 vector 69 vty 70 vty-crossplatform 71 wai-extra 72 warp 73 word-wrap 74 xml-conduit 75 yaml 76 # executable dependencies 77 code-page 78 filepath 79 hashable 80 optparse-applicative 81 time 82 with-utf8 83 ]; 84 85 executableToolDepends = [ 86 makeWrapper 87 ]; 88 89 preConfigure = '' 90 hpack 91 ''; 92 93 postInstall = 94 with haskellPackages; 95 # https://github.com/NixOS/nixpkgs/pull/304352 96 lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' 97 remove-references-to -t ${warp.out} "$out/bin/echidna" 98 remove-references-to -t ${wreq.out} "$out/bin/echidna" 99 '' 100 # make slither-analyzer a runtime dependency 101 + '' 102 wrapProgram $out/bin/echidna \ 103 --prefix PATH : ${lib.makeBinPath [ slither-analyzer ]} 104 ''; 105 106 doHaddock = false; 107 108 # tests depend on a specific version of solc 109 doCheck = false; 110 111 homepage = "https://github.com/crytic/echidna"; 112 description = "Ethereum smart contract fuzzer"; 113 license = lib.licenses.agpl3Plus; 114 maintainers = with lib.maintainers; [ 115 arturcygan 116 hellwolf 117 ]; 118 platforms = lib.platforms.unix; 119 mainProgram = "echidna"; 120}