Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 49 additions & 83 deletions flake.lock

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

13 changes: 9 additions & 4 deletions packages/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Expand Down
54 changes: 34 additions & 20 deletions packages/avalanche-cli/default.nix
Original file line number Diff line number Diff line change
@@ -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";
};
}
1 change: 1 addition & 0 deletions packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
disabledPackages = [
"circ"
"leap"
"go-opera"
];
in rec {
packages = self'.legacyPackages.metacraft-labs;
Expand Down