summary refs log tree commit diff
path: root/pkgs/tools/security/echidna
diff options
context:
space:
mode:
authorArtur Cygan <arczicygan@gmail.com>2021-07-27 17:01:14 +0200
committerArtur Cygan <arczicygan@gmail.com>2021-08-05 12:34:07 +0200
commitaf3e9c79eb9e9775d6e66be85196057fab8969b0 (patch)
treedcb4a51a7377e593996b93c4482eb5581e0cec5a /pkgs/tools/security/echidna
parent712600db3be83bd55b65432c62ca869d2a54524e (diff)
downloadnixpkgs-af3e9c79eb9e9775d6e66be85196057fab8969b0.tar
nixpkgs-af3e9c79eb9e9775d6e66be85196057fab8969b0.tar.gz
nixpkgs-af3e9c79eb9e9775d6e66be85196057fab8969b0.tar.bz2
nixpkgs-af3e9c79eb9e9775d6e66be85196057fab8969b0.tar.lz
nixpkgs-af3e9c79eb9e9775d6e66be85196057fab8969b0.tar.xz
nixpkgs-af3e9c79eb9e9775d6e66be85196057fab8969b0.tar.zst
nixpkgs-af3e9c79eb9e9775d6e66be85196057fab8969b0.zip
echidna: init at 1.7.2
Diffstat (limited to 'pkgs/tools/security/echidna')
-rw-r--r--pkgs/tools/security/echidna/default.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/tools/security/echidna/default.nix b/pkgs/tools/security/echidna/default.nix
new file mode 100644
index 00000000000..70628b75fd6
--- /dev/null
+++ b/pkgs/tools/security/echidna/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, fetchpatch
+, fetchFromGitHub
+# Haskell deps
+, mkDerivation, aeson, ansi-terminal, base, base16-bytestring, binary, brick
+, bytestring, cborg, containers, data-dword, data-has, deepseq, directory
+, exceptions, filepath, hashable, hevm, hpack, lens, lens-aeson, megaparsec
+, MonadRandom, mtl, optparse-applicative, process, random, stm, tasty
+, tasty-hunit, tasty-quickcheck, temporary, text, transformers , unix, unliftio
+, unliftio-core, unordered-containers, vector, vector-instances, vty
+, wl-pprint-annotated, word8, yaml , extra, ListLike, semver
+}:
+mkDerivation rec {
+  pname = "echidna";
+  version = "1.7.2";
+
+  src = fetchFromGitHub {
+    owner = "crytic";
+    repo = "echidna";
+    rev = "v${version}";
+    sha256 = "sha256-eFhL8Zn8204JRrF69ibPtd7VpFW63i1iVXoGwXHlqps=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "update-hevm-to-0.47.0.patch";
+      url = "https://github.com/crytic/echidna/commit/25dfdad93d0e0dd822f22a1c1e63a0ecf2b22a23.patch";
+      sha256 = "sha256-dj3Ie+Z4zE1fgROE/KuWZXaH9knsXJi1ai3gu5zyw/E=";
+    })
+  ];
+
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    aeson ansi-terminal base base16-bytestring binary brick bytestring cborg
+    containers data-dword data-has deepseq directory exceptions filepath
+    hashable hevm lens lens-aeson megaparsec MonadRandom mtl
+    optparse-applicative process random stm temporary text transformers unix
+    unliftio unliftio-core unordered-containers vector vector-instances vty
+    wl-pprint-annotated word8 yaml extra ListLike semver
+  ];
+  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;
+}