From f1195d1f04061a17f8f68c4aafdf9099be35269d Mon Sep 17 00:00:00 2001 From: Nicholas Orlowsky Date: Wed, 19 Feb 2025 23:54:15 -0500 Subject: [PATCH] add shell.nix --- .envrc | 1 + shell.nix | 11 +++++++++++ src/api_main.cpp | 1 + 3 files changed, 13 insertions(+) create mode 100644 .envrc create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..1d953f4 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..e9a5a69 --- /dev/null +++ b/shell.nix @@ -0,0 +1,11 @@ +{ pkgs ? import {} }: + pkgs.mkShell { + nativeBuildInputs = [ pkgs.pkg-config pkgs.openssl pkgs.libgcc pkgs.boost pkgs.cmake ]; + + shellHook = '' + export OPENSSL_DIR="${pkgs.openssl.dev}" + export PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig" + export OPENSSL_NO_VENDOR=1 +export OPENSSL_LIB_DIR="${pkgs.lib.getLib pkgs.openssl}/lib" + ''; +} diff --git a/src/api_main.cpp b/src/api_main.cpp index 4a42858..e7b5366 100644 --- a/src/api_main.cpp +++ b/src/api_main.cpp @@ -7,6 +7,7 @@ #include #include #include +#include using namespace anthracite;