From de9822cc8aa95758bcacb98462a1bb40fb263f62 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Sat, 26 Oct 2024 21:24:13 +0800 Subject: [PATCH 1/3] avalanchego: move to by-name --- .../default.nix => by-name/av/avalanchego/package.nix} | 0 pkgs/top-level/all-packages.nix | 4 ---- 2 files changed, 4 deletions(-) rename pkgs/{applications/networking/avalanchego/default.nix => by-name/av/avalanchego/package.nix} (100%) diff --git a/pkgs/applications/networking/avalanchego/default.nix b/pkgs/by-name/av/avalanchego/package.nix similarity index 100% rename from pkgs/applications/networking/avalanchego/default.nix rename to pkgs/by-name/av/avalanchego/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1ff8d0027675..16b91255fa60 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27898,10 +27898,6 @@ with pkgs; av-98 = callPackage ../applications/networking/browsers/av-98 { }; - avalanchego = callPackage ../applications/networking/avalanchego { - inherit (darwin.apple_sdk.frameworks) IOKit; - }; - avizo = callPackage ../applications/misc/avizo { }; avocode = callPackage ../applications/graphics/avocode { }; From 36e71377e0ac835277df2ff3ca76a81182dc5773 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Sat, 26 Oct 2024 21:24:23 +0800 Subject: [PATCH 2/3] avalanchego: nixfmt --- pkgs/by-name/av/avalanchego/package.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/av/avalanchego/package.nix b/pkgs/by-name/av/avalanchego/package.nix index 97bf552604d4..8b37a1f1b6b9 100644 --- a/pkgs/by-name/av/avalanchego/package.nix +++ b/pkgs/by-name/av/avalanchego/package.nix @@ -1,8 +1,9 @@ -{ IOKit -, buildGoModule -, fetchFromGitHub -, lib -, stdenv +{ + IOKit, + buildGoModule, + fetchFromGitHub, + lib, + stdenv, }: buildGoModule rec { @@ -39,7 +40,10 @@ buildGoModule rec { homepage = "https://github.com/ava-labs/avalanchego"; changelog = "https://github.com/ava-labs/avalanchego/releases/tag/v${version}"; license = licenses.bsd3; - maintainers = with maintainers; [ urandom qjoly ]; + maintainers = with maintainers; [ + urandom + qjoly + ]; mainProgram = "avalanchego"; }; } From 0720e51827fa00b6fe96a09a375b857cd33bfcbc Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Sat, 26 Oct 2024 21:30:28 +0800 Subject: [PATCH 3/3] avalanchego: 1.11.11 -> 1.12.0-initial-poc.6 --- pkgs/by-name/av/avalanchego/package.nix | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/av/avalanchego/package.nix b/pkgs/by-name/av/avalanchego/package.nix index 8b37a1f1b6b9..c80180fc5621 100644 --- a/pkgs/by-name/av/avalanchego/package.nix +++ b/pkgs/by-name/av/avalanchego/package.nix @@ -1,27 +1,27 @@ { - IOKit, buildGoModule, fetchFromGitHub, lib, + nix-update-script, stdenv, }: buildGoModule rec { pname = "avalanchego"; - version = "1.11.11"; + version = "1.12.0-initial-poc.6"; src = fetchFromGitHub { owner = "ava-labs"; - repo = pname; - rev = "v${version}"; - hash = "sha256-9NhwxB5AeGvQgZbjNu5WWHiP194ws7s1WDtCntLr//g="; + repo = "avalanchego"; + rev = "refs/tags/v${version}"; + hash = "sha256-LBwmoegsBWC2xlTc3BJDxyYX58b+X7g5xl9vnThVHW0="; }; - vendorHash = "sha256-A8Bf/KzTFvC/hFLU1k6M89649wjoqnIXRQ1uJaTj9YA="; - # go mod vendor has a bug, see: https://github.com/golang/go/issues/57529 + # https://github.com/golang/go/issues/57529 proxyVendor = true; - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]; + vendorHash = "sha256-slu0f0Y33aGuVpN5pZcRp9RJAXcLnZyUNO7pFdm+HrY="; + subPackages = [ "main" ]; @@ -35,12 +35,14 @@ buildGoModule rec { mv $out/bin/{main,${pname}} ''; - meta = with lib; { + passthru.updateScript = nix-update-script { }; + + meta = { description = "Go implementation of an Avalanche node"; homepage = "https://github.com/ava-labs/avalanchego"; changelog = "https://github.com/ava-labs/avalanchego/releases/tag/v${version}"; - license = licenses.bsd3; - maintainers = with maintainers; [ + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ urandom qjoly ];