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

Commit ff0c969

Browse files
authored
fix: build test on mac by updating to python3.10 (#1437)
1 parent cb632c6 commit ff0c969

File tree

8 files changed

+920
-649
lines changed

8 files changed

+920
-649
lines changed

nix/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import sources.nixpkgs {
2727
dotenv = builtins.path { name = "dotenv"; path = ../scripts/.env; };
2828
};
2929
})
30-
(_: pkgs: { test-env = import ./testenv.nix { inherit pkgs; }; })
30+
(_: pkgs: { test-env = pkgs.callPackage ./testenv.nix { }; })
3131
(_: pkgs: {
3232
cosmovisor = pkgs.buildGo118Module rec {
3333
name = "cosmovisor";

nix/sources.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
"homepage": "",
4242
"owner": "NixOS",
4343
"repo": "nixpkgs",
44-
"rev": "f904e3562aabca382d12f8471ca2330b3f82899a",
45-
"sha256": "1lsa3sjwp1v3nv2jjpkl5lf9dncplwihmavasalg9fq1217pmzmb",
44+
"rev": "ea2c6a6dda1aa35a80139a512a9dee375b0946e7",
45+
"sha256": "0nd4nn9ryqa80ssw3j2kmr8wa73p2xz1hyxp280cdzqlmdfgw1lm",
4646
"type": "tarball",
47-
"url": "https://github.com/NixOS/nixpkgs/archive/f904e3562aabca382d12f8471ca2330b3f82899a.tar.gz",
47+
"url": "https://github.com/NixOS/nixpkgs/archive/ea2c6a6dda1aa35a80139a512a9dee375b0946e7.tar.gz",
4848
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
4949
}
5050
}

nix/testenv.nix

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,38 @@
1-
{ pkgs }:
2-
pkgs.poetry2nix.mkPoetryEnv {
1+
{ poetry2nix, lib, python310 }:
2+
poetry2nix.mkPoetryEnv {
33
projectDir = ../tests/integration_tests;
4-
python = pkgs.python39;
5-
overrides = pkgs.poetry2nix.overrides.withDefaults (self: super: {
6-
eth-bloom = super.eth-bloom.overridePythonAttrs {
7-
preConfigure = ''
8-
substituteInPlace setup.py --replace \'setuptools-markdown\' ""
9-
'';
10-
};
11-
12-
pystarport = super.pystarport.overridePythonAttrs (
13-
old: {
14-
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.poetry ];
15-
}
16-
);
17-
});
4+
python = python310;
5+
overrides = poetry2nix.overrides.withDefaults (lib.composeManyExtensions [
6+
(self: super:
7+
let
8+
buildSystems = {
9+
eth-bloom = [ "setuptools" ];
10+
pystarport = [ "poetry" ];
11+
durations = [ "setuptools" ];
12+
multitail2 = [ "setuptools" ];
13+
pytest-github-actions-annotate-failures = [ "setuptools" ];
14+
flake8-black = [ "setuptools" ];
15+
multiaddr = [ "setuptools" ];
16+
};
17+
in
18+
lib.mapAttrs
19+
(attr: systems: super.${attr}.overridePythonAttrs
20+
(old: {
21+
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ map (a: self.${a}) systems;
22+
}))
23+
buildSystems
24+
)
25+
(self: super: {
26+
eth-bloom = super.eth-bloom.overridePythonAttrs {
27+
preConfigure = ''
28+
substituteInPlace setup.py --replace \'setuptools-markdown\' ""
29+
'';
30+
};
31+
pyyaml-include = super.pyyaml-include.overridePythonAttrs {
32+
preConfigure = ''
33+
substituteInPlace setup.py --replace "setup()" "setup(version=\"1.3\")"
34+
'';
35+
};
36+
})
37+
]);
1838
}

0 commit comments

Comments
 (0)