Skip to content

Commit

Permalink
Update to build with GHC 9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
siraben committed Jun 12, 2023
1 parent 916d2fc commit f2b7bec
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 23 deletions.
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 28 additions & 14 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,32 @@
'';
};

hevm = pkgs.haskell.lib.dontCheck (
pkgs.haskellPackages.callCabal2nix "hevm" (pkgs.fetchFromGitHub {
owner = "ethereum";
repo = "hevm";
rev = "release/0.50.5";
sha256 = "sha256-Vi6kL1nJdujfS1oePwqks1owVPlS5Dd5hAn0r8Rpw+k=";
}) { secp256k1 = pkgs.secp256k1; });
patchedHaskellPackages = pkgs.haskell.packages.ghc94.override {
overrides = self: super: {
# disable tests in optics
optics = pkgs.haskell.lib.dontCheck super.optics;
# use obsidian systems fork of string-qq
string-qq = self.callCabal2nix "string-qq" (pkgs.fetchFromGitHub {
owner = "obsidiansystems";
repo = "string-qq";
rev = "82ad6d72b694dc61e9b6b7eb856cb2d3d27e2865";
sha256 = "sha256-CNtB8jkNyNBR+ZJbtLoeA6U1ivT3gEs4UVFVHIZe27w=";
}) {};
# hevm needs to be jailbroken (all cabal version constraints removed)
hevm = pkgs.haskell.lib.doJailbreak (pkgs.haskell.lib.dontCheck (
self.callCabal2nix "hevm" (pkgs.fetchFromGitHub {
owner = "ethereum";
repo = "hevm";
rev = "release/0.50.5";
sha256 = "sha256-Vi6kL1nJdujfS1oePwqks1owVPlS5Dd5hAn0r8Rpw+k=";
}) { secp256k1 = pkgs.secp256k1; }));
};
};

echidna = with pkgs; lib.pipe
(haskellPackages.callCabal2nix "echidna" ./. { inherit hevm; })
(patchedHaskellPackages.callCabal2nix "echidna" ./. {})
[
(haskell.lib.compose.addTestToolDepends [ haskellPackages.hpack slither-analyzer solc ])
(haskell.lib.compose.addTestToolDepends [ patchedHaskellPackages.hpack slither-analyzer solc ])
(haskell.lib.compose.disableCabalFlag "static")
];
in rec {
Expand All @@ -60,14 +74,14 @@
pkgs.callPackage nix-bundle-exe {} (pkgs.haskell.lib.dontCheck echidna);

devShell = with pkgs;
haskellPackages.shellFor {
patchedHaskellPackages.shellFor {
packages = _: [ echidna ];
shellHook = "hpack";
buildInputs = [
buildInputs = with patchedHaskellPackages; [
solc
haskellPackages.hlint
haskellPackages.cabal-install
haskellPackages.haskell-language-server
hlint
cabal-install
haskell-language-server
];
withHoogle = true;
};
Expand Down

0 comments on commit f2b7bec

Please sign in to comment.