Skip to content

Commit

Permalink
feat(packages/blst): Init package at 0.3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Dobrev authored and PetarKirov committed Oct 13, 2023
1 parent 0f76729 commit 8720f2b
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
legacyPackages.metacraft-labs =
rec {
cosmos-theta-testnet = callPackage ./cosmos-theta-testnet {};
blst = callPackage ./blst {};

circom = callPackage ./circom/default.nix {};
circ = callPackage ./circ/default.nix {};
Expand Down
17 changes: 17 additions & 0 deletions packages/blst/builder.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
source $stdenv/setup

buildPhase() {
./build.sh
}

installPhase() {
mkdir -p $out/{include/elf,lib}
cp libblst.a $out/lib/
cp bindings/*.{h,hpp} $out/include/
cp build/assembly.S $out/include/
cp build/elf/* $out/include/elf/
cp src/*.h $out/include/
cp src/*.c $out/include/
}

genericBuild
23 changes: 23 additions & 0 deletions packages/blst/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "blst";
version = "0.3.11";

src = fetchFromGitHub {
owner = "supranational";
repo = "blst";
rev = "v${version}";
hash = "sha256-oqljy+ZXJAXEB/fJtmB8rlAr4UXM+Z2OkDa20gpILNA=";
};

builder = ./builder.sh;

meta = {
description = "Multilingual BLS12-381 signature library";
homepage = "https://github.com/supranational/blst";
platforms = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
};
}

0 comments on commit 8720f2b

Please sign in to comment.