Skip to content

Commit

Permalink
Problem: rustc in nixpkgs is too old
Browse files Browse the repository at this point in the history
Solution:
- update nixpkgs to release-23.11
  • Loading branch information
yihuang committed Feb 16, 2024
1 parent 4e65bd9 commit 1b4de2a
Show file tree
Hide file tree
Showing 12 changed files with 142 additions and 199 deletions.
8 changes: 4 additions & 4 deletions flake.lock

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

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
nixpkgs.url = "github:NixOS/nixpkgs/release-23.11";
flake-utils.url = "github:numtide/flake-utils";
nix-bundle-exe = {
url = "github:3noch/nix-bundle-exe";
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/crypto-org-chain/cronos/v2

go 1.20
go 1.21

require (
cosmossdk.io/api v0.3.1
Expand Down
143 changes: 103 additions & 40 deletions integration_tests/poetry.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions integration_tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pytest-github-actions-annotate-failures = "^0.1.1"
flake8 = "^4.0.1"
black = "^22.3.0"
flake8-black = "^0.3.2"
flake8-isort = "^4.1.1"
flake8-isort = "^6.1.1"
pep8-naming = "^0.11.1"
protobuf = "^3.13.0"
grpcio = "^1.53.2"
Expand All @@ -20,7 +20,7 @@ python-dateutil = "^2.8.1"
web3 = "^6.0.0b6"
eth-bloom = "^1.0.4"
python-dotenv = "^0.19.2"
pystarport = { git = "https://github.com/crypto-com/pystarport.git", branch = "main", rev = "39ecbd29fcdd50cb3015524c13755fda05bdf23d" }
pystarport = { git = "https://github.com/yihuang/pystarport.git", branch = "main", rev = "0ca4c51" }
websockets = "^10.3"
toml = "^0.10.2"
pysha3 = "^1.0.2"
Expand All @@ -33,5 +33,5 @@ flaky = "^3.7.0"
[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
5 changes: 2 additions & 3 deletions integration_tests/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@ pkgs.mkShell {
(pkgs.callPackage ../. { coverage = true; }) # cronosd
pkgs.start-scripts
pkgs.go-ethereum
pkgs.gorc
pkgs.cosmovisor
pkgs.poetry
pkgs.nodejs
pkgs.git
pkgs.dapp
# pkgs.dapp
(renameExe pkgs.solc-static-versions.solc_0_6_8 "solc-0.6.8" "solc06")
(renameExe pkgs.solc-static-versions.solc_0_8_21 "solc-0.8.21" "solc08")
pkgs.test-env
pkgs.nixpkgs-fmt
pkgs.rocksdb
pkgs.chain-maind
# pkgs.chain-maind
pkgs.hermes
pkgs.rly
];
Expand Down
11 changes: 0 additions & 11 deletions nix/build_overlay.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
# some basic overlays nessesary for the build
final: super: {
# include the fix: https://github.com/NixOS/nixpkgs/pull/211515
zstd = final.callPackage ./zstd.nix {
cmake = final.buildPackages.cmakeMinimal;
};
rocksdb = final.callPackage ./rocksdb.nix { };
go_1_20 = super.go_1_20.overrideAttrs (prev: rec {
version = "1.20.4";
src = final.fetchurl {
url = "https://go.dev/dl/go${version}.src.tar.gz";
hash = "sha256-nzSs4Sh2S3o6SyOLgFhWzBshhDBN+eVpCCWwcQ9CAtY=";
};
});
}
7 changes: 4 additions & 3 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import sources.nixpkgs {
flake-compat = import sources.flake-compat;
chain-maind = pkgs.callPackage sources.chain-main { rocksdb = null; };
}) # update to a version that supports eip-1559
(import "${sources.poetry2nix}/overlay.nix")
(import "${sources.gomod2nix}/overlay.nix")
(pkgs: _:
import ./scripts.nix {
Expand Down Expand Up @@ -43,11 +44,11 @@ import sources.nixpkgs {
})
(_: pkgs: { test-env = pkgs.callPackage ./testenv.nix { }; })
(_: pkgs: {
cosmovisor = pkgs.buildGo118Module rec {
cosmovisor = pkgs.buildGo120Module rec {
name = "cosmovisor";
src = sources.cosmos-sdk + "/cosmovisor";
subPackages = [ "./cmd/cosmovisor" ];
vendorSha256 = "sha256-OAXWrwpartjgSP7oeNvDJ7cTR9lyYVNhEM8HUnv3acE=";
vendorHash = "sha256-OAXWrwpartjgSP7oeNvDJ7cTR9lyYVNhEM8HUnv3acE=";
doCheck = false;
};
})
Expand All @@ -56,7 +57,7 @@ import sources.nixpkgs {
name = "rly";
src = sources.relayer;
subPackages = [ "." ];
vendorSha256 = "sha256-5s5URiAZk59mOfZdUcqYAB/IvzFuBiQH5jDBuh6huTE=";
vendorHash = "sha256-5s5URiAZk59mOfZdUcqYAB/IvzFuBiQH5jDBuh6huTE=";
doCheck = false;
GOWORK = "off";
postInstall = ''
Expand Down
2 changes: 1 addition & 1 deletion nix/go-ethereum.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ buildGoModule rec {
sha256 = "sha256-mZ11xan3MGgaUORbiQczKrXSrxzjvQMhZbpHnEal11Y=";
};

vendorSha256 = "sha256-rjSGR2ie5sFK2OOo4HUZ6+hrDlQuUDtyTKn0sh8jFBY=";
vendorHash = "sha256-rjSGR2ie5sFK2OOo4HUZ6+hrDlQuUDtyTKn0sh8jFBY=";

doCheck = false;

Expand Down
28 changes: 20 additions & 8 deletions nix/sources.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"chain-main": {
"branch": "master",
"branch": "v4.2.8",
"description": "Crypto.org Chain⛓: Croeseid Testnet and beyond development",
"homepage": "https://crypto.org",
"owner": "crypto-org-chain",
"repo": "chain-main",
"rev": "02455a4eafa8f2f6e4bd4aa9886904cfd3d518aa",
"sha256": "0ndlld82xw5004ma97ap6z6vhfsbkcma8yhvw891l3bf98rfllgk",
"rev": "641d3b9c562fa3836fb5f4ab8b0b4aa93e894c47",
"sha256": "0cpwqbnddjfha745v2k74cg43ip1rl6qay4gpy6ylq0nbjmz0yv8",
"type": "tarball",
"url": "https://github.com/crypto-org-chain/chain-main/archive/02455a4eafa8f2f6e4bd4aa9886904cfd3d518aa.tar.gz",
"url": "https://github.com/crypto-org-chain/chain-main/archive/641d3b9c562fa3836fb5f4ab8b0b4aa93e894c47.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"cosmos-sdk": {
Expand Down Expand Up @@ -97,15 +97,27 @@
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
"branch": "master",
"branch": "release-23.11",
"description": "Nix Packages collection",
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "90aa73fc8e1550b16d1ebdc436e48d9951f7989b",
"sha256": "0jh4npbcqjlszhnaz5mkziv5g1p5ig6wqp68yjxkjllsc7vhsrw6",
"rev": "0ca77ade2a34c5466be6d54f1267507860c95da8",
"sha256": "11q88xx5njl31h3qrc213qx43yi9fqlfrbfwv2h5dgamgbpp2jk9",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/0ca77ade2a34c5466be6d54f1267507860c95da8.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"poetry2nix": {
"branch": "master",
"description": "Convert poetry projects to nix automagically [maintainer=@adisbladis] ",
"homepage": "",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "4eb2ac54029af42a001c9901194e9ce19cbd8a40",
"sha256": "16fi71fpywiqsya1z99kkb14dansyrmkkrb2clzs3b5qqx673wf4",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/90aa73fc8e1550b16d1ebdc436e48d9951f7989b.tar.gz",
"url": "https://github.com/nix-community/poetry2nix/archive/4eb2ac54029af42a001c9901194e9ce19cbd8a40.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"relayer": {
Expand Down
3 changes: 2 additions & 1 deletion nix/testenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ poetry2nix.mkPoetryEnv {
let
buildSystems = {
eth-bloom = [ "setuptools" ];
pystarport = [ "poetry" ];
pystarport = [ "poetry-core" "setuptools" ];
cprotobuf = [ "setuptools" ];
durations = [ "setuptools" ];
multitail2 = [ "setuptools" ];
pytest-github-actions-annotate-failures = [ "setuptools" ];
flake8-black = [ "setuptools" ];
flake8-isort = [ "hatchling" ];
multiaddr = [ "setuptools" ];
};
in
Expand Down
122 changes: 0 additions & 122 deletions nix/zstd.nix

This file was deleted.

0 comments on commit 1b4de2a

Please sign in to comment.