Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into fedekunze/estimate-gas-perf
Browse files Browse the repository at this point in the history
  • Loading branch information
fedekunze authored Nov 9, 2022
2 parents fd2a661 + ff0c969 commit 082bded
Show file tree
Hide file tree
Showing 8 changed files with 920 additions and 649 deletions.
2 changes: 1 addition & 1 deletion nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import sources.nixpkgs {
dotenv = builtins.path { name = "dotenv"; path = ../scripts/.env; };
};
})
(_: pkgs: { test-env = import ./testenv.nix { inherit pkgs; }; })
(_: pkgs: { test-env = pkgs.callPackage ./testenv.nix { }; })
(_: pkgs: {
cosmovisor = pkgs.buildGo118Module rec {
name = "cosmovisor";
Expand Down
6 changes: 3 additions & 3 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f904e3562aabca382d12f8471ca2330b3f82899a",
"sha256": "1lsa3sjwp1v3nv2jjpkl5lf9dncplwihmavasalg9fq1217pmzmb",
"rev": "ea2c6a6dda1aa35a80139a512a9dee375b0946e7",
"sha256": "0nd4nn9ryqa80ssw3j2kmr8wa73p2xz1hyxp280cdzqlmdfgw1lm",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/f904e3562aabca382d12f8471ca2330b3f82899a.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/ea2c6a6dda1aa35a80139a512a9dee375b0946e7.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
52 changes: 36 additions & 16 deletions nix/testenv.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,38 @@
{ pkgs }:
pkgs.poetry2nix.mkPoetryEnv {
{ poetry2nix, lib, python310 }:
poetry2nix.mkPoetryEnv {
projectDir = ../tests/integration_tests;
python = pkgs.python39;
overrides = pkgs.poetry2nix.overrides.withDefaults (self: super: {
eth-bloom = super.eth-bloom.overridePythonAttrs {
preConfigure = ''
substituteInPlace setup.py --replace \'setuptools-markdown\' ""
'';
};

pystarport = super.pystarport.overridePythonAttrs (
old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.poetry ];
}
);
});
python = python310;
overrides = poetry2nix.overrides.withDefaults (lib.composeManyExtensions [
(self: super:
let
buildSystems = {
eth-bloom = [ "setuptools" ];
pystarport = [ "poetry" ];
durations = [ "setuptools" ];
multitail2 = [ "setuptools" ];
pytest-github-actions-annotate-failures = [ "setuptools" ];
flake8-black = [ "setuptools" ];
multiaddr = [ "setuptools" ];
};
in
lib.mapAttrs
(attr: systems: super.${attr}.overridePythonAttrs
(old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ map (a: self.${a}) systems;
}))
buildSystems
)
(self: super: {
eth-bloom = super.eth-bloom.overridePythonAttrs {
preConfigure = ''
substituteInPlace setup.py --replace \'setuptools-markdown\' ""
'';
};
pyyaml-include = super.pyyaml-include.overridePythonAttrs {
preConfigure = ''
substituteInPlace setup.py --replace "setup()" "setup(version=\"1.3\")"
'';
};
})
]);
}
Loading

0 comments on commit 082bded

Please sign in to comment.