Skip to content

Commit 8268c1c

Browse files
committed
feat: install libblst
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent fbd2351 commit 8268c1c

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ ARG CABAL_VERSION=3.8.1.0
33
ARG GHC_VERSION=8.10.7
44
ARG LIBSODIUM_REF=dbb48cce
55
ARG SECP256K1_REF=ac83be33
6+
ARG BLST_REF=v0.3.10
67

78
WORKDIR /code
89

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

75+
# BLST
76+
COPY libblst.pc /usr/local/lib/pkgconfig/
77+
RUN git clone https://github.com/supranational/blst && \
78+
cd blst && \
79+
git checkout ${BLST_REF} && \
80+
./build.sh && \
81+
cp bindings/blst_aux.h bindings/blst.h bindings/blst.hpp /usr/local/include/ && \
82+
cp libblst.a /usr/local/lib/ && \
83+
chmod u=rw,go=r /usr/local/lib/pkgconfig/libblst.pc \
84+
/usr/local/include/blst_aux.h /usr/local/include/blst.h /usr/local/include/blst.hpp \
85+
/usr/local/lib/libblst.a
86+
7487
FROM builder as haskell

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
A container image with GHC and cabal for developing Haskell applications for
44
Cardano.
55

6-
This image is based on Debian Slim for ease of extension.
6+
This image is based on Debian Bookworm (Slim) for ease of extension.
77

8-
Includes libsodium and libsecp256k1 which are commonly used in Cardano.
8+
Includes libsodium, libsecp256k1, and BLST which are also used in Cardano.

libblst.pc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
prefix=/usr/local
2+
exec_prefix=${prefix}
3+
libdir=${exec_prefix}/lib
4+
includedir=${prefix}/include
5+
6+
Name: libblst
7+
Description: Multilingual BLS12-381 signature library
8+
URL: https://github.com/supranational/blst
9+
Version: 0.3.10
10+
Cflags: -I${includedir}
11+
Libs: -L${libdir} -lblst

0 commit comments

Comments
 (0)