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: install libblst #15

Merged
merged 1 commit into from
Dec 6, 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
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
Loading