push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,67 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a21b94..0ac7911 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,10 +67,10 @@ endif()
include_directories(
${PROJECT_SOURCE_DIR}/generated/
- ${PROJECT_SOURCE_DIR}/third_party/
- ${PROJECT_SOURCE_DIR}/third_party/Catch2/single_include
- ${PROJECT_SOURCE_DIR}/third_party/yaml-cpp/include
- ${PROJECT_SOURCE_DIR}/third_party/antlr4/runtime/Cpp/runtime/src
+ @libargs@/include
+ @catch2@/include
+ @yamlCpp@/include
+ @antlr4RuntimeCpp@/include/antlr4-runtime
${PROJECT_SOURCE_DIR}/src/
)
@@ -92,9 +92,6 @@ file(GLOB_RECURSE yaml-cpp-src
${PROJECT_SOURCE_DIR}/third_party/yaml-cpp/src/*.cpp
)
-add_library (antlr4-cpp-runtime ${antlr4-cpp-src})
-add_library (yaml-cpp ${yaml-cpp-src})
-
add_executable(lua-format ${src_dir} src/main.cpp)
if(WIN32)
@@ -104,7 +101,7 @@ endif()
set_target_properties(lua-format PROPERTIES LINKER_LANGUAGE CXX)
-target_link_libraries(lua-format yaml-cpp antlr4-cpp-runtime ${extra-libs})
+target_link_libraries(lua-format yaml-cpp antlr4-runtime ${extra-libs})
install(TARGETS lua-format
RUNTIME DESTINATION bin
@@ -135,7 +132,7 @@ if(BUILD_TESTS)
endif()
target_compile_definitions(lua-format-test PUBLIC PROJECT_PATH="${PROJECT_SOURCE_DIR}")
- target_link_libraries(lua-format-test yaml-cpp antlr4-cpp-runtime ${extra-libs})
+ target_link_libraries(lua-format-test yaml-cpp antlr4-runtime ${extra-libs})
add_test(NAME args COMMAND lua-format-test [args])
add_test(NAME config COMMAND lua-format-test [config])
diff --git a/src/main.cpp b/src/main.cpp
index 38962a2..332aad6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,4 +1,4 @@
-#include <args/args.hxx>
+#include <args.hxx>
#include <cstdlib>
#include <fstream>
#include <iostream>
diff --git a/test/test_args.cpp b/test/test_args.cpp
index 69a5746..b988d00 100644
--- a/test/test_args.cpp
+++ b/test/test_args.cpp
@@ -1,4 +1,4 @@
-#include <args/args.hxx>
+#include <args.hxx>
#include <catch2/catch.hpp>
#include <iostream>
#include <tuple>

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchFromGitHub,
replaceVars,
antlr4_9,
libargs,
catch2,
cmake,
yaml-cpp,
}:
let
antlr4 = antlr4_9;
in
stdenv.mkDerivation rec {
pname = "luaformatter";
version = "1.3.6";
src = fetchFromGitHub {
owner = "Koihik";
repo = "LuaFormatter";
rev = version;
sha256 = "14l1f9hrp6m7z3cm5yl0njba6gfixzdirxjl8nihp9val0685vm0";
};
patches = [
(replaceVars ./fix-lib-paths.patch {
antlr4RuntimeCpp = antlr4.runtime.cpp.dev;
yamlCpp = yaml-cpp;
inherit libargs catch2;
})
];
nativeBuildInputs = [ cmake ];
buildInputs = [
antlr4.runtime.cpp
yaml-cpp
];
meta = with lib; {
description = "Code formatter for Lua";
homepage = "https://github.com/Koihik/LuaFormatter";
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ figsoda ];
mainProgram = "lua-format";
};
}