diff --git a/flake.lock b/flake.lock index a2a3b5d0..c4c86d77 100644 --- a/flake.lock +++ b/flake.lock @@ -100,11 +100,11 @@ }, "crane": { "locked": { - "lastModified": 1731974733, - "narHash": "sha256-enYSSZVVl15FI5p+0Y5/Ckf5DZAvXe6fBrHxyhA/njc=", + "lastModified": 1732407143, + "narHash": "sha256-qJOGDT6PACoX+GbNH2PPx2ievlmtT1NVeTB80EkRLys=", "owner": "ipetkov", "repo": "crane", - "rev": "3cb338ce81076ce5e461cf77f7824476addb0e1c", + "rev": "f2b4b472983817021d9ffb60838b2b36b9376b20", "type": "github" }, "original": { @@ -123,7 +123,10 @@ "nixos-modules", "flake-compat" ], - "git-hooks": "git-hooks", + "git-hooks": [ + "nixos-modules", + "git-hooks-nix" + ], "nix": "nix", "nixpkgs": [ "nixos-modules", @@ -131,11 +134,11 @@ ] }, "locked": { - "lastModified": 1732298876, - "narHash": "sha256-WXlcDNMaMJeI4JO4VfQM2ZZCBJBds7j7N04tS9UjiYU=", + "lastModified": 1732372847, + "narHash": "sha256-TeQSs2Dd2tXBgeBsoJpdJOySG0qKZAnsTHqZ+9dGQX4=", "owner": "cachix", "repo": "devenv", - "rev": "741e23a22f3dc9e53075be3eaa795ea9ed6f5129", + "rev": "5203d46c94236cdad41f538f7a898cd97f3261b6", "type": "github" }, "original": { @@ -254,7 +257,7 @@ "lib-extras": "lib-extras", "nixpkgs": [ "nixos-modules", - "nixpkgs" + "nixos-2405" ], "nixpkgs-2311": [ "nixos-modules", @@ -297,11 +300,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1732257345, - "narHash": "sha256-YetzCpGzm7RnSHIUhSqljv3iLOGdg/XufbUvMOrC7tg=", + "lastModified": 1732343620, + "narHash": "sha256-IuOzr1HjFK8RxeDITfe1LQKgbUjgqlgeGc8jf9tKAuY=", "owner": "nix-community", "repo": "fenix", - "rev": "3b89d5df39afc6ef3a8575fa92d8fa10ec68c95f", + "rev": "cb6515f398908e1c74dea085e72b3e3a0a81c6e2", "type": "github" }, "original": { @@ -509,44 +512,13 @@ "type": "github" } }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "nixos-modules", - "devenv" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "nixos-modules", - "devenv", - "nixpkgs" - ], - "nixpkgs-stable": [ - "nixos-modules", - "devenv" - ] - }, - "locked": { - "lastModified": 1730302582, - "narHash": "sha256-W1MIJpADXQCgosJZT8qBYLRuZls2KSiKdpnTVdKBuvU=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "git-hooks-nix": { "inputs": { "flake-compat": [ "nixos-modules", "flake-compat" ], - "gitignore": "gitignore_2", + "gitignore": "gitignore", "nixpkgs": [ "nixos-modules", "nixpkgs" @@ -571,29 +543,6 @@ } }, "gitignore": { - "inputs": { - "nixpkgs": [ - "nixos-modules", - "devenv", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gitignore_2": { "inputs": { "nixpkgs": [ "nixos-modules", @@ -648,16 +597,16 @@ ] }, "locked": { - "lastModified": 1726989464, - "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", + "lastModified": 1732319136, + "narHash": "sha256-wpmPl6FkAF9Jj5C/rzANgpUjfzQrUYOn267LnzKU2uI=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", + "rev": "f8831cc700030e11fc91da9ef6270593e6440edc", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.05", + "ref": "release-24.11", "repo": "home-manager", "type": "github" } @@ -788,11 +737,11 @@ ] }, "locked": { - "lastModified": 1732229547, - "narHash": "sha256-vtUhSQFgDfyyNM6rgmn35A2T+L5PXBS0H89cxWK9N2A=", + "lastModified": 1732420287, + "narHash": "sha256-CzvYF4x6jUh/+NEEIFrIY5t1W/N3IA2bNZJiMXu9GTo=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "edabc790a834326dcb5810e2698fa743483510d0", + "rev": "3c52583b99666a349a6219dc1f0dd07d75c82d6a", "type": "github" }, "original": { @@ -837,11 +786,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1732158339, - "narHash": "sha256-37M8Ohbf5Ui5+4GE//5isxjdzGIlsmVN6NXhTgxiCXo=", + "lastModified": 1732342928, + "narHash": "sha256-87zIj5gt1wY0UmRXHnf4ydCJoweOX4HCS/nEbvEF0b8=", "owner": "nix-community", "repo": "nixd", - "rev": "6d80199f5b3b24521a1be335e2a75683f859d82a", + "rev": "5507bb141efc11cf548e87e39b61da66dfbca9e5", "type": "github" }, "original": { @@ -882,6 +831,22 @@ "type": "github" } }, + "nixos-2411": { + "locked": { + "lastModified": 1731755305, + "narHash": "sha256-v5P3dk5JdiT+4x69ZaB18B8+Rcu3TIOrcdG4uEX7WZ8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "057f63b6dc1a2c67301286152eb5af20747a9cb4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nixos-anywhere": { "inputs": { "disko": [ @@ -968,11 +933,12 @@ "nixd": "nixd", "nixos-2311": "nixos-2311", "nixos-2405": "nixos-2405", + "nixos-2411": "nixos-2411", "nixos-anywhere": "nixos-anywhere", "nixos-images": "nixos-images", "nixpkgs": [ "nixos-modules", - "nixos-2405" + "nixos-2411" ], "nixpkgs-unstable": "nixpkgs-unstable", "systems": "systems", @@ -982,11 +948,11 @@ "vscode-server": "vscode-server" }, "locked": { - "lastModified": 1732317078, - "narHash": "sha256-HRWufiMNElkQBFDGC/PzrMMtuJmqKF5C5nX0N7d6F44=", + "lastModified": 1732430952, + "narHash": "sha256-SvjEzP4eT6U4vOmeGjj98oqW14i2v4gzz0Lm8XGTMyo=", "owner": "metacraft-labs", "repo": "nixos-modules", - "rev": "3223a1a92e50785f077863051f4025e0274ffe39", + "rev": "4d5ee91c5950441d14f7c5910498d505ae1e0771", "type": "github" }, "original": { @@ -1177,11 +1143,11 @@ ] }, "locked": { - "lastModified": 1732242723, - "narHash": "sha256-NWI8csIK0ujFlFuEXKnoc+7hWoCiEtINK9r48LUUMeU=", + "lastModified": 1732328983, + "narHash": "sha256-RHt12f/slrzDpSL7SSkydh8wUE4Nr4r23HlpWywed9E=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "a229311fcb45b88a95fdfa5cecd8349c809a272a", + "rev": "ed8aa5b64f7d36d9338eb1d0a3bb60cf52069a72", "type": "github" }, "original": { diff --git a/packages/all-packages.nix b/packages/all-packages.nix index 81f11ce7..0aed0d22 100644 --- a/packages/all-packages.nix +++ b/packages/all-packages.nix @@ -115,13 +115,16 @@ circom = callPackage ./circom/default.nix {craneLib = craneLib-stable;}; circ = callPackage ./circ/default.nix {craneLib = craneLib-stable;}; - emscripten = pkgs.emscripten.overrideAttrs (old: { + emscripten = pkgs.emscripten.overrideAttrs (_old: { postInstall = '' pushd $TMPDIR - echo 'int __main_argc_argv() { return 42; }' >test.c + echo 'int __main_argc_argv( int a, int b ) { return 42; }' >test.c for MEM in "-s ALLOW_MEMORY_GROWTH" ""; do for LTO in -flto ""; do - for OPT in "-O2" "-O3" "-Oz" "-Os"; do + # FIXME: change to the following, once binaryen is updated to + # >= v119 in Nixpkgs: + # for OPT in "-O2" "-O3" "-Oz" "-Os"; do + for OPT in "-O2"; do $out/bin/emcc $MEM $LTO $OPT -s WASM=1 -s STANDALONE_WASM test.c done done @@ -136,7 +139,9 @@ # Polkadot inherit polkadot polkadot-fast; - avalanche-cli = callPackage ./avalanche-cli/default.nix {}; + avalanche-cli = callPackage ./avalanche-cli/default.nix { + inherit blst; + }; inherit corepack-shims; } diff --git a/packages/avalanche-cli/default.nix b/packages/avalanche-cli/default.nix index 584d541c..772469fe 100644 --- a/packages/avalanche-cli/default.nix +++ b/packages/avalanche-cli/default.nix @@ -1,23 +1,37 @@ -{pkgs}: -with pkgs; - buildGoModule rec { - pname = "avalanche-cli"; - version = "1.4.2"; +{ + lib, + buildGoModule, + fetchFromGitHub, + blst, + libusb1, +}: +buildGoModule rec { + pname = "avalanche-cli"; + version = "unstable-2024-11-23"; - src = fetchFromGitHub { - rev = "v${version}"; - sha256 = "sha256-KhUPQVOHHbRNhnEzHVPSB1JMgtbJKsm2NYMtIAK8kk4="; - owner = "ava-labs"; - repo = "avalanche-cli"; - }; + src = fetchFromGitHub { + owner = "ava-labs"; + repo = "avalanche-cli"; + rev = "6debe4169dce2c64352d8c9d0d0acac49e573661"; + hash = "sha256-kYEgKpR6FM3f6Lq3Wxhi8MVh8ojxyqFYgjeu2E8lNcs="; + }; - doCheck = false; - proxyVendor = true; - vendorHash = "sha256-vhytojvmCOakN9RubjKkFnfA8tzOsOb+hKuACeQGSk4="; + proxyVendor = true; + vendorHash = "sha256-FLuu2Q9O4kPtdT1LWaClv+96G0m0PFpZx22506V+Sts="; - meta = with lib; { - description = "Avalanche CLI is a command line tool that gives developers access to everything Avalanche."; - homepage = "https://github.com/ava-labs/avalanche-cli"; - license = licenses.lgpl3; - }; - } + doCheck = false; + + ldflags = [ + "-X=github.com/ava-labs/avalanche-cli/cmd.Version=${version}" + ]; + + buildInputs = [blst libusb1]; + + meta = { + description = ""; + homepage = "https://github.com/ava-labs/avalanche-cli"; + # FIXME: nix-init did not find a license + maintainers = with lib.maintainers; []; + mainProgram = "avalanche-cli"; + }; +} diff --git a/packages/default.nix b/packages/default.nix index 6917ec71..5832c83e 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -48,6 +48,7 @@ disabledPackages = [ "circ" "leap" + "go-opera" ]; in rec { packages = self'.legacyPackages.metacraft-labs;