refactor(hmpl,hectic): warnings

This commit is contained in:
2025-03-24 13:36:31 +00:00
parent 972e2d2968
commit d39ed7f9fe
13 changed files with 537 additions and 117 deletions

View File

@@ -1,4 +1,4 @@
{ stdenv, gcc, lib }:
{ stdenv, gcc, lib, bash }:
stdenv.mkDerivation {
pname = "hectic";
@@ -6,22 +6,15 @@ stdenv.mkDerivation {
src = ./.;
doCheck = true;
nativeBuildInputs = [ gcc ];
buildPhase = ''
mkdir -p target
${gcc}/bin/cc -Wall -Wextra -g \
-std=c99 \
-pedantic -fsanitize=address \
-c hectic.c -o target/hectic.o
${gcc}/bin/ar rcs target/libhectic.a target/hectic.o
ls
${bash}/bin/sh ./make.sh build
'';
checkPhase = ''
mkdir -p target/test
for test_file in test/*.c; do
exe="target/test/$(basename ''${test_file%.c})"
${gcc}/bin/cc -Wall -Wextra -g -pedantic -fsanitize=address -I. "$test_file" -Ltarget -lhectic -o "$exe"
"$exe"
done
${bash}/bin/sh ./make.sh check
'';
installPhase = ''
@@ -31,7 +24,7 @@ stdenv.mkDerivation {
'';
meta = {
description = "libhectic";
description = "hectic";
license = lib.licenses.mit;
};
}