Skip to content

Commit

Permalink
Bump nixpkgs (#185)
Browse files Browse the repository at this point in the history
* WIP in compiling Act

* Act compiling

* Nits

* Fix compilation error

* bump flake

* hevm update

* nit

* Fix in decompiler simplification

* flake: use dynamic hevm output

---------

Co-authored-by: dxo <[email protected]>
  • Loading branch information
zoep and d-xo authored Oct 23, 2024
1 parent 206a9b2 commit 151d988
Show file tree
Hide file tree
Showing 13 changed files with 245 additions and 178 deletions.
2 changes: 2 additions & 0 deletions act.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ common common
deriving-compat,
async >= 2.2.4,
data-dword >= 0.3.2.1,
prettyprinter,
prettyprinter-ansi-terminal,
if flag(ci)
ghc-options: -O2 -Wall -Werror -Wno-orphans -Wno-unticked-promoted-constructors
else
Expand Down
181 changes: 100 additions & 81 deletions flake.lock

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

32 changes: 16 additions & 16 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@

inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/f85a3c6af20f02135814867870deb419329e8297";
hevmUpstream = {
url = "github:ethereum/hevm";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
hevm = {
url = "github:ethereum/hevm/dynamic-flake-output";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, flake-utils, hevmUpstream, ... }:
outputs = { nixpkgs, flake-utils, hevm, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
gitignore = pkgs.nix-gitignore.gitignoreSourcePure [ ./.gitignore ];
myHaskellPackages = pkgs.haskellPackages.override {
overrides = self: super: rec {
hevm = hevmUpstream.packages.${system}.noTests;
hspkgs = pkgs.haskellPackages.override {
overrides = self: super: {
hevm = hevm.packages.${system}.unwrapped;
};
};
act = (myHaskellPackages.callCabal2nixWithOptions "act" (gitignore ./.) "-fci" {})
act = (hspkgs.callCabal2nixWithOptions "act" (gitignore ./.) "-fci" {})
.overrideAttrs (attrs : {
buildInputs = attrs.buildInputs ++ [ pkgs.z3 pkgs.cvc5 pkgs.solc ];
});
Expand All @@ -31,13 +31,13 @@
apps.act = flake-utils.lib.mkApp { drv = packages.act; };
apps.default = apps.act;

devShell = with pkgs;
let libraryPath = "${lib.makeLibraryPath [ libff secp256k1 gmp ]}";
in myHaskellPackages.shellFor {
devShell = let
libraryPath = "${pkgs.lib.makeLibraryPath (with pkgs; [ libff secp256k1 gmp ])}";
in hspkgs.shellFor {
packages = _: [ act ];
buildInputs = with pkgs.haskellPackages; [
cabal-install
haskell-language-server
buildInputs = [
hspkgs.cabal-install
hspkgs.haskell-language-server
pkgs.jq
pkgs.z3
pkgs.cvc5
Expand All @@ -54,7 +54,7 @@
export PATH=$(pwd)/bin:$PATH
export DYLD_LIBRARY_PATH="${libraryPath}"
'';
};
}
};
}
);
}
Loading

0 comments on commit 151d988

Please sign in to comment.