Skip to content

Commit

Permalink
Merge pull request #15 from blinklabs-io/feat/libblst
Browse files Browse the repository at this point in the history
feat: install libblst
  • Loading branch information
wolf31o2 authored Dec 6, 2023
2 parents fbd2351 + 8268c1c commit 3935124
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ARG CABAL_VERSION=3.8.1.0
ARG GHC_VERSION=8.10.7
ARG LIBSODIUM_REF=dbb48cce
ARG SECP256K1_REF=ac83be33
ARG BLST_REF=v0.3.10

WORKDIR /code

Expand Down Expand Up @@ -71,4 +72,16 @@ RUN git clone https://github.com/bitcoin-core/secp256k1 && \
make && \
make install

# BLST
COPY libblst.pc /usr/local/lib/pkgconfig/
RUN git clone https://github.com/supranational/blst && \
cd blst && \
git checkout ${BLST_REF} && \
./build.sh && \
cp bindings/blst_aux.h bindings/blst.h bindings/blst.hpp /usr/local/include/ && \
cp libblst.a /usr/local/lib/ && \
chmod u=rw,go=r /usr/local/lib/pkgconfig/libblst.pc \
/usr/local/include/blst_aux.h /usr/local/include/blst.h /usr/local/include/blst.hpp \
/usr/local/lib/libblst.a

FROM builder as haskell
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
A container image with GHC and cabal for developing Haskell applications for
Cardano.

This image is based on Debian Slim for ease of extension.
This image is based on Debian Bookworm (Slim) for ease of extension.

Includes libsodium and libsecp256k1 which are commonly used in Cardano.
Includes libsodium, libsecp256k1, and BLST which are also used in Cardano.
11 changes: 11 additions & 0 deletions libblst.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libblst
Description: Multilingual BLS12-381 signature library
URL: https://github.com/supranational/blst
Version: 0.3.10
Cflags: -I${includedir}
Libs: -L${libdir} -lblst

0 comments on commit 3935124

Please sign in to comment.