nkoturovic / cpp-serbia-nix-examples

Contains code samples used in the C++ Serbia meetup on Nix package manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

From template iso-cpp Built with nix kotur.me

CPP Serbia Nix examples

This repository contains code samples used in the C++ Serbia meetup on Nix package manager.

nix meetup thumbnail

Other links

Dependencies

Building and running demo app

Building demo app

There are multiple directories, all containing same app but different way of getting dependencies

demo-app

01_system: Relies on a system package manager

mkdir build && cd build
cmake ..  -DCMAKE_BUILD_TYPE=Debug
make

02_docker: Relies on Docker

docker build -t hello_cpp_serbia .
docker run hello_cpp_serbia
# You will probably need to stop it
docker stop $(docker ps -a -q  --filter ancestor=hello_cpp_serbia)

03_conan: Relies on the Conan package manager

mkdir build 
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make

04_nix-shell: Relies on the Nix package manager

nix-shell
mkdir build 
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make

05_nix: Relies on the Nix package manager

nix-build
./result/bin/hello_cpp_serbia ../OpenSans-Regular.ttf

Running demo app

App requires one argument (ttf font) which will be used when rendering the message.

Specify relative path to ./OpenSans-Regular.ttf as a first argument, depending on where are you calling app from.

./result/bin/hello_cpp_serbia <REPO_ROOT>/OpenSans-Regular.ttf

For more instructions look at the cpp-nix-project-template

About

Contains code samples used in the C++ Serbia meetup on Nix package manager


Languages

Language:C++ 54.5%Language:Nix 31.1%Language:CMake 12.6%Language:Dockerfile 1.7%