summaryrefslogtreecommitdiff
path: root/kel_cpp_boilerplate/c++/blueprints
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2025-10-29 17:16:47 +0100
committerClaudius "keldu" Holeksa <mail@keldu.de>2025-10-29 17:16:47 +0100
commit0b3acb991f11d9ace340f75bc2f8a454ea385fae (patch)
tree15d9a49af39febab9576174a445a557df4f80174 /kel_cpp_boilerplate/c++/blueprints
parentdfc45729d342f6f4d4d9ea39649c49b49fa178c6 (diff)
downloadapps-dev_tools-0b3acb991f11d9ace340f75bc2f8a454ea385fae.tar.gz
Got to a first satisfying state for this boilerplate generator
Diffstat (limited to 'kel_cpp_boilerplate/c++/blueprints')
-rw-r--r--kel_cpp_boilerplate/c++/blueprints/default_nix.hpp6
-rw-r--r--kel_cpp_boilerplate/c++/blueprints/derivation_nix.hpp7
-rw-r--r--kel_cpp_boilerplate/c++/blueprints/gitignore.hpp6
-rw-r--r--kel_cpp_boilerplate/c++/blueprints/main_cpp.hpp7
-rw-r--r--kel_cpp_boilerplate/c++/blueprints/readme_txt.hpp12
-rw-r--r--kel_cpp_boilerplate/c++/blueprints/sconscript.hpp9
-rw-r--r--kel_cpp_boilerplate/c++/blueprints/sconstruct.hpp7
7 files changed, 31 insertions, 23 deletions
diff --git a/kel_cpp_boilerplate/c++/blueprints/default_nix.hpp b/kel_cpp_boilerplate/c++/blueprints/default_nix.hpp
index 312ad7f..6edb8e1 100644
--- a/kel_cpp_boilerplate/c++/blueprints/default_nix.hpp
+++ b/kel_cpp_boilerplate/c++/blueprints/default_nix.hpp
@@ -1,10 +1,10 @@
#pragma once
#include <string_view>
-constexpr std::string_view default_nix_file_name = "default.nix";
+constexpr std::string_view default_nix_file_path = "default.nix";
-constexpr std::string_view default_nix_file_content = R"(
-{ pkgs ? import <nixpkgs> {}
+constexpr std::string_view default_nix_file_content =
+R"({ pkgs ? import <nixpkgs> {}
, stdenv ? pkgs.llvmPackages_19.stdenv
, clang-tools ? pkgs.clang-tools_19
}:
diff --git a/kel_cpp_boilerplate/c++/blueprints/derivation_nix.hpp b/kel_cpp_boilerplate/c++/blueprints/derivation_nix.hpp
index 9715769..4417a8d 100644
--- a/kel_cpp_boilerplate/c++/blueprints/derivation_nix.hpp
+++ b/kel_cpp_boilerplate/c++/blueprints/derivation_nix.hpp
@@ -1,11 +1,10 @@
#pragma once
#include <string_view>
-constexpr std::string_view derivation_nix_dir_name = "app/.nix";
-constexpr std::string_view derivation_nix_file_name = "derivation.nix";
+constexpr std::string_view derivation_nix_file_path = "app/.nix/derivation.nix";
-constexpr std::string_view derivation_nix_file_content = R"(
-{ stdenv
+constexpr std::string_view derivation_nix_file_content =
+R"({ stdenv
, scons
, clang-tools
, forstio
diff --git a/kel_cpp_boilerplate/c++/blueprints/gitignore.hpp b/kel_cpp_boilerplate/c++/blueprints/gitignore.hpp
index b09b153..d7d141e 100644
--- a/kel_cpp_boilerplate/c++/blueprints/gitignore.hpp
+++ b/kel_cpp_boilerplate/c++/blueprints/gitignore.hpp
@@ -1,8 +1,8 @@
#pragma once
#include <string_view>
-constexpr std::string_view gitignore_file_name = ".gitignore";
+constexpr std::string_view gitignore_file_path = ".gitignore";
-constexpr std::string_view gitignore_file_content = R"(
-result*
+constexpr std::string_view gitignore_file_content =
+R"(result*
)";
diff --git a/kel_cpp_boilerplate/c++/blueprints/main_cpp.hpp b/kel_cpp_boilerplate/c++/blueprints/main_cpp.hpp
index 353a045..c3bdb39 100644
--- a/kel_cpp_boilerplate/c++/blueprints/main_cpp.hpp
+++ b/kel_cpp_boilerplate/c++/blueprints/main_cpp.hpp
@@ -1,11 +1,10 @@
#pragma once
#include <string_view>
-constexpr std::string_view main_cpp_dir_name = "app/c++";
-constexpr std::string_view main_cpp_file_name = "main.cpp";
+constexpr std::string_view main_cpp_file_path = "app/c++/main.cpp";
-constexpr std::string_view main_cpp_file_content = R"(
-#include <forstio/error.hpp>
+constexpr std::string_view main_cpp_file_content =
+R"(#include <forstio/error.hpp>
#include <iostream>
namespace kel {
diff --git a/kel_cpp_boilerplate/c++/blueprints/readme_txt.hpp b/kel_cpp_boilerplate/c++/blueprints/readme_txt.hpp
new file mode 100644
index 0000000..ffb2c65
--- /dev/null
+++ b/kel_cpp_boilerplate/c++/blueprints/readme_txt.hpp
@@ -0,0 +1,12 @@
+#pragma once
+#include <string_view>
+
+constexpr std::string_view readme_txt_file_path = "readme.txt";
+
+constexpr std::string_view readme_txt_file_content =
+R"(# Generated by keldu's stupid blueprint program
+
+Remember to:
+* Change the binary name in app/c++/Sconscript
+* Add the pname in app/.nix/derivation.nix
+)";
diff --git a/kel_cpp_boilerplate/c++/blueprints/sconscript.hpp b/kel_cpp_boilerplate/c++/blueprints/sconscript.hpp
index e1c8c8b..bd25fdd 100644
--- a/kel_cpp_boilerplate/c++/blueprints/sconscript.hpp
+++ b/kel_cpp_boilerplate/c++/blueprints/sconscript.hpp
@@ -2,11 +2,10 @@
#include <string_view>
-constexpr std::string_view sconscript_dir_name = "app/c++";
-constexpr std::string_view sconscript_file_name = "SConscript";
+constexpr std::string_view sconscript_file_path = "app/c++/SConscript";
-constexpr std::string_view sconscript_file_content = R"(
-#!/bin/false
+constexpr std::string_view sconscript_file_content =
+R"(#!/bin/false
import os
import os.path
@@ -29,7 +28,7 @@ env.headers += program_env.headers;
## Static lib
objects_static = []
program_env.add_source_files(objects_static, program_env.sources, shared=False);
-env.binary = program_env.Program('#build/kel_cpp_boilerplate', [objects_static]);
+env.binary = program_env.Program('#build/binary_change_in_sconscript', [objects_static]);
# Set Alias
env.Alias('binary', [env.binary]);
diff --git a/kel_cpp_boilerplate/c++/blueprints/sconstruct.hpp b/kel_cpp_boilerplate/c++/blueprints/sconstruct.hpp
index cd47e83..ba4f84e 100644
--- a/kel_cpp_boilerplate/c++/blueprints/sconstruct.hpp
+++ b/kel_cpp_boilerplate/c++/blueprints/sconstruct.hpp
@@ -2,11 +2,10 @@
#include <string_view>
-constexpr std::string_view sconstruct_dir_name = "app";
-constexpr std::string_view sconstruct_file_name = "SConstruct";
+constexpr std::string_view sconstruct_file_path = "app/SConstruct";
-constexpr std::string_view sconstruct_file_content = R"(
-#!/usr/bin/env python3
+constexpr std::string_view sconstruct_file_content =
+R"(#!/usr/bin/env python3
import sys
import os