From ec5017a8b89d4fbd00f970c22b163997c55ee273 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Thu, 23 Jan 2020 15:14:41 +0100 Subject: [PATCH] Build with libcrypto for https support --- hqtoxbot.nimble | 4 ++++ src/hqtoxbot.nim | 2 ++ src/nim.cfg | 1 + 3 files changed, 7 insertions(+) create mode 100644 src/nim.cfg diff --git a/hqtoxbot.nimble b/hqtoxbot.nimble index 3c2a538..04ad90f 100644 --- a/hqtoxbot.nimble +++ b/hqtoxbot.nimble @@ -10,3 +10,7 @@ bin = @["hqtoxbot"] # Dependencies requires "nim >= 1.0.0", "toxcore >= 0.2.0" + +import distros +if detectOs(NixOS): + foreignDep "openssl" diff --git a/src/hqtoxbot.nim b/src/hqtoxbot.nim index bfc500e..856059e 100644 --- a/src/hqtoxbot.nim +++ b/src/hqtoxbot.nim @@ -2,6 +2,8 @@ import toxcore import std/asyncdispatch, std/base64, std/json, std/httpclient, std/os, std/strutils +{.passL: "-lcrypto".} + const readmeText = readFile "README.md" spaceApiUrl = "http://spaceapi.hq.c3d2.de:3000/spaceapi.json" diff --git a/src/nim.cfg b/src/nim.cfg new file mode 100644 index 0000000..521e21d --- /dev/null +++ b/src/nim.cfg @@ -0,0 +1 @@ +-d:ssl