refactor: reorganize directory structure

This commit is contained in:
Kiana Sheibani 2025-09-04 22:01:00 -04:00
parent 433a4f2c0d
commit d4913ac8df
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
5 changed files with 5 additions and 5 deletions

22
assignment1/default.nix Normal file
View file

@ -0,0 +1,22 @@
let
basic-c = name: { stdenv }:
stdenv.mkDerivation {
inherit name;
src = ./.;
buildPhase = ''
runHook preBuild
gcc part2/${name}.c -o ${name}
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install ${name} $out/bin/
runHook postInstall
'';
};
in {
a1-hello = basic-c "hello";
a1-employee = basic-c "employee";
a1-logwriter = basic-c "logwriter";
}