Templates
Every example of this project is also a flake template, so each one can be
instantiated into an empty directory with nix flake init. The
Getting started chapter walks through the first steps
with one of them.
Simple conan-flake project with only a flake-parts-based configuration
Section titled “Simple conan-flake project with only a flake-parts-based configuration”This template will get you only the flake.nix, .envrc and .gitignore
files.
mkdir -p default && cd defaultnix flake init -t "git+https://codeberg.org/tarcisio/conan-flake"C++ conan-flake, flake-parts-based project
Section titled “C++ conan-flake, flake-parts-based project”Alongside the files from the previous item, this template will provide you also with a complete sample Conan-based C++ project.
mkdir -p example && cd examplegit initnix flake init -t "git+https://codeberg.org/tarcisio/conan-flake"#templates.exampledirenv allow .After this initial setup is complete, test if everything is working:
conan create . --build=missingThe remaining templates in this chapter can be initialized and validated in a similar manner.
LLVM-based C++ conan-flake project
Section titled “LLVM-based C++ conan-flake project”This template is also flake-parts-based; see the
LLVM chapter.
nix flake init -t "git+https://codeberg.org/tarcisio/conan-flake"#templates.llvmC++ conan-flake, “devenv with flake-parts”-based project
Section titled “C++ conan-flake, “devenv with flake-parts”-based project”nix flake init -t "git+https://codeberg.org/tarcisio/conan-flake"#templates.devenvC++ conan-flake, devenv-based project
Section titled “C++ conan-flake, devenv-based project”nix flake init -t "git+https://codeberg.org/tarcisio/conan-flake"#templates.devenv-moduleC++ conan-flake, devenv-based project featuring a local-recipe-index remote
Section titled “C++ conan-flake, devenv-based project featuring a local-recipe-index remote”nix flake init -t "git+https://codeberg.org/tarcisio/conan-flake"#templates.devenv-module-recipeC++ conan-flake standalone Nix module project
Section titled “C++ conan-flake standalone Nix module project”See the Standalone chapter.
nix flake init -t "git+https://codeberg.org/tarcisio/conan-flake"#templates.standaloneC++ conan-flake, flake-parts-based project demonstrating CUDA integration
Section titled “C++ conan-flake, flake-parts-based project demonstrating CUDA integration”See the CUDA chapter.
nix flake init -t "git+https://codeberg.org/tarcisio/conan-flake"#templates.cuda