Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nix Flake Template for C++ using

All of this information is also included in the README.md

Initialize using

nix flake init --template "github:nulladmin1/nix-flake-templates#cpp"

This is how the structure of the template looks like:

📦 cpp
├─ 🔒 Cargo.lock
├─ ⚙️ CMakeLists.txt
├─ 🔒 flake.lock
├─ ⚙️ flake.nix
├─ 📁 src
│  ├─ 📝 hello.cpp
│  ├─ ⚙️ CMakeLists.txt
├─ 🔨 Makefile
├─ 📃 README.md

It includes a really simple Hello World program

Run using Nix

nix run

Go into Development Shell

nix develop

(Optional) Format flake.nix using Alejandra

nix fmt

To customize it to your own needs

  • In flake.nix
    • Edit description
      {
          description = "Nix Flake Template for Python using Poetry";
          # ...
      }	
    • Change the name of the binary
         {
        # ...		
            program = "${self.packages.${system}.default}/bin/hello";
        # ...	
        }
  • For the structure and code
    • Add necessary code into the src/ directory and configure CMake accordingly

About

A converter app made using C++

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages