add test suite, help/exit functionality

This commit is contained in:
mtgmonkey 2025-06-27 16:34:26 -04:00
parent a183d55b69
commit 6d162f5ae9
7 changed files with 441 additions and 69 deletions

30
test.nix Normal file
View file

@ -0,0 +1,30 @@
{
lib,
stdenv,
nasm,
...
}:
stdenv.mkDerivation {
name = "asm-test";
src = ./src;
nativeBuildInputs = [
nasm
];
buildInputs = [
];
configurePhase = ''
'';
buildPhase = ''
nasm -f elf test_start.asm
ld -m elf_i386 test_start.o -o test
'';
installPhase = ''
mkdir -p $out/bin
cp test $out/bin/test
'';
meta = {
license = lib.licenses.wtfpl;
mainProgram = "test";
};
}