Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(prysm): arm support #386

Merged
merged 1 commit into from
Oct 5, 2023
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
2 changes: 1 addition & 1 deletion packages/clients/consensus/prysm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ buildGoModule rec {
description = "Go implementation of Ethereum proof of stake";
homepage = "https://github.com/prysmaticlabs/prysm";
mainProgram = "beacon-chain";
platforms = ["x86_64-linux"];
platforms = ["x86_64-linux" "aarch64-linux"];
};
}
2 changes: 1 addition & 1 deletion packages/clients/execution/geth/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ in
homepage = "https://geth.ethereum.org/";
license = with licenses; [lgpl3Plus gpl3Plus];
mainProgram = "geth";
platforms = ["x86_64-linux"];
platforms = ["x86_64-linux" "aarch64-linux"];
};
}
12 changes: 10 additions & 2 deletions packages/libs/bls/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
fetchFromGitHub,
gmp,
stdenv,
clang,
system,
lib,
}:
stdenv.mkDerivation rec {
pname = "bls";
Expand All @@ -16,7 +19,12 @@ stdenv.mkDerivation rec {
hash = "sha256-VIJi8sjDq40ecPnEWzFPDR2t5rCOUIWxfI4QAemfPPM=";
};

nativeBuildInputs = [cmake];
nativeBuildInputs = [cmake] ++ (lib.optionals (system == "aarch64-linux") [clang]);
cmakeFlags = lib.optionals (system == "aarch64-linux") [
"-DCMAKE_CXX_COMPILER=clang++"
"-DCMAKE_CXX_COMPILER_ID=Clang"
];

buildInputs = [gmp];

# ETH2.0 spec
Expand All @@ -25,6 +33,6 @@ stdenv.mkDerivation rec {
meta = {
description = "BLS threshold signature";
homepage = "https://github.com/herumi/bls";
platforms = ["x86_64-linux" "aarch64-darwin"];
platforms = ["x86_64-linux" "aarch64-darwin" "aarch64-linux"];
};
}
2 changes: 1 addition & 1 deletion packages/libs/blst/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ stdenv.mkDerivation rec {
meta = {
description = "Multilingual BLS12-381 signature library";
homepage = "https://github.com/supranational/blst";
platforms = ["x86_64-linux"];
platforms = ["x86_64-linux" "aarch64-linux"];
};
}
2 changes: 1 addition & 1 deletion packages/libs/crytic-compile/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ python3.pkgs.buildPythonPackage rec {
description = "Abstraction layer for smart contract build systems";
homepage = "https://github.com/crytic/crytic-compile";
license = licenses.agpl3Plus;
platforms = ["x86_64-linux"];
platforms = ["x86_64-linux" "aarch64-linux"];
};
}
2 changes: 1 addition & 1 deletion packages/libs/evmc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ stdenv.mkDerivation rec {
meta = {
description = "EVMC – Ethereum Client-VM Connector API";
homepage = "https://github.com/ethereum/evmc";
platforms = ["x86_64-linux"];
platforms = ["x86_64-linux" "aarch64-linux"];
};
}
12 changes: 11 additions & 1 deletion packages/libs/mcl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
fetchFromGitHub,
gmpxx,
stdenv,
clang,
cmake,
system,
lib,
}:
stdenv.mkDerivation rec {
pname = "mcl";
Expand All @@ -14,15 +18,21 @@ stdenv.mkDerivation rec {
hash = "sha256-aVuBt5T+tNjrK1QahzaCxuimUDQVtoKfK/v0LTT3hy8=";
};

nativeBuildInputs = [cmake] ++ (lib.optionals (system == "aarch64-linux") [clang]);
buildInputs = [gmpxx];

cmakeFlags = lib.optionals (system == "aarch64-linux") [
"-DCMAKE_CXX_COMPILER=clang++"
"-DCMAKE_CXX_COMPILER_ID=Clang"
];

installPhase = ''
make PREFIX=$out/ install
'';

meta = {
description = "A portable and fast pairing-based cryptography library";
homepage = "https://github.com/herumi/mcl";
platforms = ["x86_64-linux" "aarch64-darwin"];
platforms = ["x86_64-linux" "aarch64-darwin" "aarch64-linux"];
};
}