feat(hectic C): json api

This commit is contained in:
2025-03-22 01:22:36 +00:00
parent aff923d470
commit bcaca5038d
11 changed files with 680 additions and 163 deletions

View File

@@ -10,16 +10,29 @@ stdenv.mkDerivation {
buildPhase = ''
mkdir -p target
echo "# Build library"
${gcc}/bin/cc -Wall -Wextra -g \
-pedantic -fsanitize=address hmpl.c \
-std=c99 \
-pedantic -fsanitize=address -c hmpl.c \
-lchectic -lcjson \
-o target/hmpl.o
${gcc}/bin/ar rcs target/libhmpl.a target/hmpl.o
echo "# Build app"
${gcc}/bin/cc -Wall -Wextra -g \
-pedantic -fsanitize=address main.c \
-Ltarget -lhmpl \
-lchectic -lcjson -o target/hmpl
'';
checkPhase = '' '';
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/bin $out/lib $out/include
cp target/hmpl $out/bin/hmpl
cp target/libhmpl.a $out/lib/
cp hmpl.h $out/include/hmpl.h
'';
meta = {