Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to build with GHC 9.4 #1073

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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