feat(assign1): add basic "Hello World" program

This commit is contained in:
Kiana Sheibani 2025-09-04 21:05:45 -04:00
parent 95cd73423a
commit 0122c877ac
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
4 changed files with 33 additions and 2 deletions

View file

@ -0,0 +1,8 @@
#include <stdio.h>
int main() {
printf("Welcome to OwlTech Industries!\n");
printf("Systems Programming Division\n");
return 0;
}

12
assign1/default.nix Normal file
View file

@ -0,0 +1,12 @@
{
assign1-hello = { stdenv }:
stdenv.mkDerivation {
name = "hello";
src = ./.;
buildPhase = "gcc c-programs/hello.c -o hello";
installPhase = ''
mkdir -p $out/bin
install hello $out/bin/hello
'';
};
}