[M7] generated flake.nix moves to build/flake.nix
This commit is contained in:
@@ -109,7 +109,7 @@ namespace {
|
||||
|
||||
auto run_nix_cmake(const fs::path& project_root, const std::vector<std::string>& cmake_args,
|
||||
std::string_view phase) -> util::Result<void> {
|
||||
std::vector<std::string> args{"develop", "--command", "cmake"};
|
||||
std::vector<std::string> args{"develop", "path:./build", "--command", "cmake"};
|
||||
args.insert(args.end(), cmake_args.begin(), cmake_args.end());
|
||||
|
||||
auto r = exec::run("nix", args, exec::ExecOptions{
|
||||
@@ -233,7 +233,7 @@ auto cmd_build(const fs::path& project_root, bool no_build, bool release,
|
||||
project_root / "build"));
|
||||
}
|
||||
|
||||
if (auto r = write_text(project_root / "flake.nix", flake_text); !r) {
|
||||
if (auto r = write_text(project_root / "build" / "flake.nix", flake_text); !r) {
|
||||
return std::unexpected(r.error());
|
||||
}
|
||||
if (auto r = write_text(project_root / "build" / "CMakeLists.txt", cmake_text); !r) {
|
||||
|
||||
@@ -19,8 +19,8 @@ auto cmd_test(const fs::path& project_root, bool release,
|
||||
const auto build_dir = std::format("build/{}", profile);
|
||||
|
||||
auto r = exec::run("nix",
|
||||
{"develop", "--command", "ctest", "--test-dir", build_dir,
|
||||
"--output-on-failure"},
|
||||
{"develop", "path:./build", "--command", "ctest",
|
||||
"--test-dir", build_dir, "--output-on-failure"},
|
||||
exec::ExecOptions{
|
||||
.cwd = project_root,
|
||||
.env_overrides = {},
|
||||
|
||||
@@ -115,7 +115,7 @@ auto run(int argc, char** argv) -> int {
|
||||
return 1;
|
||||
}
|
||||
if (build_no_build) {
|
||||
std::cout << " Generated flake.nix, build/CMakeLists.txt, Cargoxx.lock\n";
|
||||
std::cout << " Generated build/flake.nix, build/CMakeLists.txt, Cargoxx.lock\n";
|
||||
} else {
|
||||
std::cout << " Built\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user