Upgrade to Nim 2.0
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
parent
11742447a4
commit
55849a5847
2 changed files with 29 additions and 42 deletions
21
Dockerfile
21
Dockerfile
|
@ -1,4 +1,4 @@
|
|||
FROM alpine:edge as builder
|
||||
FROM nimlang/nim:2.0.0-alpine as builder
|
||||
|
||||
RUN apk update && apk add autoconf \
|
||||
automake \
|
||||
|
@ -13,7 +13,7 @@ RUN apk update && apk add autoconf \
|
|||
sqlite-dev \
|
||||
sqlite-static
|
||||
|
||||
ENV NIM_VERSION v1.6.12
|
||||
|
||||
ENV LIBRESSL_VERSION v3.8.0
|
||||
|
||||
# Compile LibreSSL Portable from source
|
||||
|
@ -25,25 +25,11 @@ RUN git clone https://github.com/libressl/portable --depth=1 -b ${LIBRESSL_VERSI
|
|||
cmake -G"Ninja" .. && \
|
||||
ninja
|
||||
|
||||
# Compile Nim from source including upstream patch
|
||||
RUN git clone https://github.com/nim-lang/Nim.git --depth=1 -b ${NIM_VERSION} && \
|
||||
cd Nim && \
|
||||
git config user.name gitlab && \
|
||||
git config user.email gitlab-ci@git.baalajimaestro.me && \
|
||||
curl https://github.com/nim-lang/Nim/commit/7c96eb45482dae4a78cf05d7fa85ae5018e2fe5f.patch | git am && \
|
||||
bash build_all.sh
|
||||
|
||||
# Add built nim to path
|
||||
ENV PATH=/Nim/bin:$PATH
|
||||
|
||||
# Update nimble
|
||||
RUN nimble install nimble --accept
|
||||
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
|
||||
# Build with necessary params to enable statically linking openssl, glibc and sqlite3
|
||||
RUN /root/.nimble/bin/nimble build --passL:-L/usr/lib \
|
||||
RUN nimble build --passL:-L/usr/lib \
|
||||
-d:ssl \
|
||||
-d:libressl \
|
||||
-p:. \
|
||||
|
@ -63,6 +49,7 @@ RUN /root/.nimble/bin/nimble build --passL:-L/usr/lib \
|
|||
-d:release \
|
||||
--opt:speed \
|
||||
--mm:orc \
|
||||
--threadAnalysis:off \
|
||||
--deepcopy=on \
|
||||
--accept
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Package
|
||||
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
author = "baalajimaestro"
|
||||
description = "Censor Bot for Telegram written in Nim"
|
||||
license = "AGPL-3.0-or-later"
|
||||
|
@ -10,6 +10,6 @@ bin = @["nim_censor_bot"]
|
|||
|
||||
# Dependencies
|
||||
|
||||
requires "nim >= 1.6.0"
|
||||
requires "telebot >= 2023.05.31"
|
||||
requires "norm >= 2.8.0"
|
||||
requires "nim >= 2.0.0"
|
||||
requires "telebot >= 2023.08.20"
|
||||
requires "norm >= 2.8.1"
|
||||
|
|
Loading…
Reference in a new issue