From 6150ae716430c2f943abb74b3378027cba0271b9 Mon Sep 17 00:00:00 2001 From: HuangYi Date: Thu, 27 Apr 2023 16:37:33 +0800 Subject: [PATCH 1/2] Problem: go 1.20.3 not used Solution: - update nixpkgs to release-22.11 - manually update go src to 1.20.3 - prepare for v4.2.4 release --- CHANGELOG.md | 5 ++++- flake.lock | 8 ++++---- flake.nix | 9 ++++++++- nix/default.nix | 7 +++++++ nix/sources.json | 8 ++++---- 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 250608fce..4a1bb073c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,12 @@ # Changelog -## UNRELEASED +*April 27, 2023* + +## v4.2.4 - [#927](https://github.com/crypto-org-chain/chain-main/pull/927) Integrate versiondb. - [#942](https://github.com/crypto-org-chain/chain-main/pull/942) Update cosmos-sdk to `v0.46.12` to support `iavl-lazy-loading`. +- [#]() Update nixpkgs to release-22.11 and go version to 1.20.3. *February 20, 2023* diff --git a/flake.lock b/flake.lock index d2443244a..6f8778999 100644 --- a/flake.lock +++ b/flake.lock @@ -56,16 +56,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1677725835, - "narHash": "sha256-G/Y2u7MfUCYrHa15N/oE7R+lJmEC8FeIomkJDh8TEV0=", + "lastModified": 1682538316, + "narHash": "sha256-YuHgVsR7S9zxJWHo7lo2ugd+uDC4ESWg1hA4bEZQv3Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4f16b8f48ea836282c81c915d6a16b0663a89d2d", + "rev": "15b75800dce80225b44f067c9012b09de37dfad2", "type": "github" }, "original": { "owner": "NixOS", - "ref": "master", + "ref": "release-22.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 789ffe8f8..e8653be11 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/master"; + nixpkgs.url = "github:NixOS/nixpkgs/release-22.11"; flake-utils.url = "github:numtide/flake-utils"; nix-bundle-exe = { url = "github:3noch/nix-bundle-exe"; @@ -72,6 +72,13 @@ ''; bundle-win-exe = drv: final.callPackage ./nix/bundle-win-exe.nix { cronosd = drv; }; rocksdb = final.callPackage ./nix/rocksdb.nix { }; + go_1_20 = prev.go_1_20.overrideAttrs (prev: rec { + version = "1.20.3"; + src = final.fetchurl { + url = "https://go.dev/dl/go${version}.src.tar.gz"; + hash = "sha256-5Ee0mM3lAhXE92GeUSSw/E4l+10W6kcnHEfyeOeqdjo="; + }; + }); } // (with final; let matrix = lib.cartesianProductOfSets { diff --git a/nix/default.nix b/nix/default.nix index e05886688..a18a0ffe2 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -13,6 +13,13 @@ import sources.nixpkgs { }) (import "${sources.gomod2nix}/overlay.nix") (pkgs: prev: { + go_1_20 = prev.go_1_20.overrideAttrs (prev: rec { + version = "1.20.3"; + src = pkgs.fetchurl { + url = "https://go.dev/dl/go${version}.src.tar.gz"; + hash = "sha256-5Ee0mM3lAhXE92GeUSSw/E4l+10W6kcnHEfyeOeqdjo="; + }; + }); go = pkgs.go_1_20; test-env = pkgs.callPackage ./testenv.nix { }; lint-ci = pkgs.writeShellScriptBin "lint-ci" '' diff --git a/nix/sources.json b/nix/sources.json index 907bcf1ce..cea7aad03 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -36,15 +36,15 @@ "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs": { - "branch": "master", + "branch": "release-22.11", "description": "Nix Packages collection", "homepage": "", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4f16b8f48ea836282c81c915d6a16b0663a89d2d", - "sha256": "0p8i2cghw2b9la45gw02c4kaa7zd0kx3fydd3lmjcl0znfxkdxhv", + "rev": "15b75800dce80225b44f067c9012b09de37dfad2", + "sha256": "0xmza136qf0hssh2a4dq62w7w1xs6rdfxs314pqxqjvvqibf1qb2", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/4f16b8f48ea836282c81c915d6a16b0663a89d2d.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/15b75800dce80225b44f067c9012b09de37dfad2.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } } From 3f28db9fb994d811567ee11094fc5bbbe48167f7 Mon Sep 17 00:00:00 2001 From: yihuang Date: Thu, 27 Apr 2023 16:55:13 +0800 Subject: [PATCH 2/2] Update CHANGELOG.md Signed-off-by: yihuang --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a1bb073c..31ba145fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - [#927](https://github.com/crypto-org-chain/chain-main/pull/927) Integrate versiondb. - [#942](https://github.com/crypto-org-chain/chain-main/pull/942) Update cosmos-sdk to `v0.46.12` to support `iavl-lazy-loading`. -- [#]() Update nixpkgs to release-22.11 and go version to 1.20.3. +- [#946](https://github.com/crypto-org-chain/chain-main/pull/946) Update nixpkgs to release-22.11 and go version to 1.20.3. *February 20, 2023*