Skip to content

Commit

Permalink
Problem: nixpkgs is too old
Browse files Browse the repository at this point in the history
Solution:
- update to release-23.11
  • Loading branch information
yihuang committed Feb 16, 2024
1 parent 04e8e09 commit 591a02c
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 165 deletions.
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ in
buildGoApplication rec {
pname = "chain-maind";
version = "4.2.8";
go = buildPackages.go_1_20;
go = buildPackages.go_1_21;
src = lib.cleanSourceWith {
name = "src";
src = lib.sourceByRegex ./. src_regexes;
Expand Down
20 changes: 10 additions & 10 deletions flake.lock

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

6 changes: 3 additions & 3 deletions 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 All @@ -9,7 +9,7 @@
gomod2nix = {
url = "github:nix-community/gomod2nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "flake-utils";
inputs.flake-utils.follows = "flake-utils";
};
};

Expand Down Expand Up @@ -49,7 +49,7 @@
devShells = {
chain-maind = pkgs.mkShell {
buildInputs = with pkgs; [
go_1_20
go_1_21
rocksdb
];
};
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/chain-main/v4

go 1.20
go 1.21

require (
cosmossdk.io/errors v1.0.0-beta.7
Expand Down
6 changes: 3 additions & 3 deletions integration_tests/poetry.lock

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

6 changes: 3 additions & 3 deletions integration_tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pytest-github-actions-annotate-failures = "^0.1.7"
protobuf = "^3.20.2"
pyyaml = "^6.0.1"
python-dateutil = "^2.8.1"
pystarport = { git = "https://github.com/crypto-com/pystarport.git", branch = "main" }
pystarport = { git = "https://github.com/crypto-com/pystarport.git", branch = "main", rev = "403b845" }
chainlibpy = "^2.2.0"

# manually upgrade to make hatchling build success in poetry2nix
Expand All @@ -28,5 +28,5 @@ pathspec = "^0.10.1"
[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"
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=";
};
});
}
6 changes: 3 additions & 3 deletions nix/bundle-win-exe.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ runCommand "tarball-${chain-maind.name}"
"${zlib}/bin/zlib1.dll"
"${zstd.bin}/bin/libzstd.dll"
"${windows.mingw_w64_pthreads}/bin/libwinpthread-1.dll"
"${windows.mcfgthreads}/bin/mcfgthread-12.dll"
"${stdenv.cc.cc}/x86_64-w64-mingw32/lib/libgcc_s_seh-1.dll"
"${stdenv.cc.cc}/x86_64-w64-mingw32/lib/libstdc++-6.dll"
"${windows.mcfgthreads}/bin/libmcfgthread-1.dll"
"${stdenv.cc.cc.lib}/x86_64-w64-mingw32/lib/libgcc_s_seh-1.dll"
"${stdenv.cc.cc.lib}/x86_64-w64-mingw32/lib/libstdc++-6.dll"
];
} ''
mkdir -p $out
Expand Down
1 change: 1 addition & 0 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import sources.nixpkgs {
};
hermes = pkgs.callPackage ./hermes.nix { src = sources.ibc-rs; };
})
(import "${sources.poetry2nix}/overlay.nix")
(import "${sources.gomod2nix}/overlay.nix")
(import ./build_overlay.nix)
(pkgs: prev: {
Expand Down
26 changes: 19 additions & 7 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"homepage": null,
"owner": "nix-community",
"repo": "gomod2nix",
"rev": "3cbf3a51fe32e2f57af4c52744e7228bab22983d",
"sha256": "11kn199nxcw6zspqawkrsfwv8wzx581wif3day160qlg11ya9di5",
"rev": "30e3c3a9ec4ac8453282ca7f67fca9e1da12c3e6",
"sha256": "1m0q0p1xidsp61xfrbj8ld1dqk3fhyrfifxj2ks36yjbnzmi1x69",
"type": "tarball",
"url": "https://github.com/nix-community/gomod2nix/archive/3cbf3a51fe32e2f57af4c52744e7228bab22983d.tar.gz",
"url": "https://github.com/nix-community/gomod2nix/archive/30e3c3a9ec4ac8453282ca7f67fca9e1da12c3e6.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"ibc-rs": {
Expand All @@ -36,15 +36,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": "0ed7136921ea094c771db674c9d2566b14852a01",
"sha256": "0bhi67drgldn1hj464k9l749dyncgpq9j5a997rwsf0wksxh5a9b",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/0ed7136921ea094c771db674c9d2566b14852a01.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"
}
}
2 changes: 1 addition & 1 deletion nix/testenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ poetry2nix.mkPoetryEnv {
buildSystems = {
pyparsing = [ "flit-core" ];
hdwallets = [ "poetry" ];
pystarport = [ "poetry" ];
pystarport = [ "poetry-core" ];
durations = [ "setuptools" ];
multitail2 = [ "setuptools" ];
pytest-github-actions-annotate-failures = [ "setuptools" ];
Expand Down
122 changes: 0 additions & 122 deletions nix/zstd.nix

This file was deleted.

0 comments on commit 591a02c

Please sign in to comment.